From: Alison Schofield <alison.schofield@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: linux-cxl@vger.kernel.org, dan.j.williams@intel.com,
vishal.l.verma@intel.com, ira.weiny@intel.com
Subject: Re: [PATCH] cxl: Add warning comment to cxl_root_decoder
Date: Wed, 26 Apr 2023 21:03:30 -0700 [thread overview]
Message-ID: <ZEn0EmlHN5u016os@aschofie-mobl2> (raw)
In-Reply-To: <168255005846.53394.2779436232786699829.stgit@djiang5-mobl3>
On Wed, Apr 26, 2023 at 04:00:58PM -0700, Dave Jiang wrote:
Perhaps more content in the commit message, like:
cxl: Warn of flexible array in struct cxl_root_decoder
> The 'cxl_switch_decoder' member in 'cxl_root_decoder' must be the last
> element due to 'cxl_switch_decoder' has a flexible array at the
> end of the struct. Any variables placed after will be corrupted.
> Add a warning comment to 'cxl_root_decoder'.
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/cxl.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index 044a92d9813e..999c0aa5ed54 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -419,6 +419,7 @@ struct cxl_root_decoder {
> cxl_calc_hb_fn calc_hb;
> void *platform_data;
> struct mutex range_lock;
> + /* This must be the last member of the struct. It contains a flexible array */
Can this comment fit within 80 chars?
> struct cxl_switch_decoder cxlsd;
> };
>
>
>
prev parent reply other threads:[~2023-04-27 4:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 23:00 [PATCH] cxl: Add warning comment to cxl_root_decoder Dave Jiang
2023-04-27 4:03 ` Alison Schofield [this message]
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=ZEn0EmlHN5u016os@aschofie-mobl2 \
--to=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--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