From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Li Ming <ming.li@zohomail.com>
Cc: Dave Jiang <dave.jiang@intel.com>, <dave@stgolabs.net>,
<alison.schofield@intel.com>, <vishal.l.verma@intel.com>,
<ira.weiny@intel.com>, <dan.j.williams@intel.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH] cxl: Add comment about 'cxl_root_decoder' and flex array
Date: Wed, 11 Jun 2025 14:28:24 +0100 [thread overview]
Message-ID: <20250611142824.000068c1@huawei.com> (raw)
In-Reply-To: <e3d942a2-aa21-4195-8a2d-008236ea7276@zohomail.com>
On Wed, 11 Jun 2025 19:19:47 +0800
Li Ming <ming.li@zohomail.com> wrote:
> On 6/11/2025 1:54 AM, Dave Jiang wrote:
> > Add a warning comment for 'struct cxl_root_decoder' to not add members
> > after 'cxlsd' since 'cxlsd' has flex array at the end.
> >
> > Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Mind you this is pretty common and I thought we now had instrumentation
to catch if anyone broke this rule? Maybe that project isn't quite
there yet.
> > ---
> > drivers/cxl/cxl.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> > index 9a17e8beca7a..68596e9216f3 100644
> > --- a/drivers/cxl/cxl.h
> > +++ b/drivers/cxl/cxl.h
> > @@ -445,6 +445,7 @@ struct cxl_root_decoder {
> > int qos_class;
> > const struct cxl_rd_ops *ops;
> > struct cxl_switch_decoder cxlsd;
> > + /* DO NOT ADD AFTER THIS POINT, cxlsd has flex array component */
> > };
> >
> > /*
> >
> > base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
> > prerequisite-patch-id: 77982cd1ed494cf0f747ccf74c6b8949be9837d6
>
>
next prev parent reply other threads:[~2025-06-11 13:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 17:54 [PATCH] cxl: Add comment about 'cxl_root_decoder' and flex array Dave Jiang
2025-06-11 11:19 ` Li Ming
2025-06-11 13:28 ` Jonathan Cameron [this message]
2025-06-11 15:40 ` Dave Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250611142824.000068c1@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox