aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/zynq-fpga.c
diff options
context:
space:
mode:
authorRobert Richter <[email protected]>2024-02-16 15:58:43 +0000
committerDan Williams <[email protected]>2024-03-13 06:52:29 +0000
commite0c818e00443ce4a704519d85a21e3c14179e3a6 (patch)
treee6c92ec123c81c99429be4cda41f08183be3308d /drivers/fpga/zynq-fpga.c
parentcxl/pci: Rename DOE mailbox handle to doe_mb (diff)
downloadkernel-e0c818e00443ce4a704519d85a21e3c14179e3a6.tar.gz
kernel-e0c818e00443ce4a704519d85a21e3c14179e3a6.zip
cxl/pci: Get rid of pointer arithmetic reading CDAT table
Reading the CDAT table using DOE requires a Table Access Response Header in addition to the CDAT entry. In current implementation this has caused offsets with sizeof(__le32) to the actual buffers. This led to hardly readable code and even bugs. E.g., see fix of devm_kfree() in read_cdat_data(): commit c65efe3685f5 ("cxl/cdat: Free correct buffer on checksum error") Rework code to avoid calculations with sizeof(__le32). Introduce struct cdat_doe_rsp for this which contains the Table Access Response Header and a variable payload size for various data structures afterwards to access the CDAT table and its CDAT Data Structures without recalculating buffer offsets. Cc: Lukas Wunner <[email protected]> Cc: Fan Ni <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Signed-off-by: Robert Richter <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'drivers/fpga/zynq-fpga.c')
0 files changed, 0 insertions, 0 deletions