Re: [PATCH] cxl/pci: Get rid of pointer arithmetic reading CDAT table

From: Robert Richter
Date: Thu Jan 04 2024 - 08:43:39 EST


On 14.12.23 20:34:09, Dan Williams wrote:

> struct cdat_response {
> __le32 doe_header;
> union {
> struct cdat_header header;
> struct cdat_entry_header entry;
> u8 table[];
> };
> } __packed;
>
> As far as I can see nothing outside of drivers/cxl/core/pci.c needs
> 'struct cdat_response', so it can stay local to this C file.

I moved that close to cdat_header and cdat_entry_header which is also
defined in cxlpci.h but only used in core/pci.c. I would like to keep
them together but we could move that completely into pci.c in a
separate patch?

Thanks,

-Robert