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

From: Dan Williams
Date: Thu Dec 07 2023 - 16:18:36 EST


Ira Weiny wrote:
> Robert Richter wrote:
[..]
> > - cdat_table = cdat_buf + sizeof(__le32);
> > - if (cdat_checksum(cdat_table, cdat_length))
> > + if (cdat_checksum(doe->table, length))
> > goto err;
> >
> > - port->cdat.table = cdat_table;
> > - port->cdat.length = cdat_length;
> > - return;
> > + port->cdat.table = doe->table;
>
> As an aside: the type of port->cdat may need to change at some point too.

I did not understand this comment relative to what you expect to see in
the next posting, but maybe Robert will when he respins this patch.