[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65739e147ba03_1e7d272945d@iweiny-mobl.notmuch>
Date: Fri, 8 Dec 2023 14:52:04 -0800
From: Ira Weiny <ira.weiny@...el.com>
To: Dan Williams <dan.j.williams@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Robert Richter <rrichter@....com>
CC: Ira Weiny <ira.weiny@...el.com>,
Davidlohr Bueso <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
<linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Fan Ni <nifan.cxl@...il.com>, Lukas Wunner <lukas@...ner.de>
Subject: Re: [PATCH] cxl/pci: Get rid of pointer arithmetic reading CDAT table
Dan Williams wrote:
> 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.
Robert introduced some new types which better defined what the read algorithm
was doing. Right now the table is just a void *. It would be nice to type it
more strongly as it starts to be used in the kernel.
Ira
Powered by blists - more mailing lists