From: Dave Jiang <dave.jiang@intel.com>
To: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>,
dave@stgolabs.net, jonathan.cameron@huawei.com,
lison.schofield@intel.com, vishal.l.verma@intel.com
Cc: ira.weiny@intel.com, dan.j.williams@intel.com,
linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxl/pci: Remove outdated FIXME comment and BUILD_BUG_ON
Date: Tue, 6 Jan 2026 10:55:13 -0700 [thread overview]
Message-ID: <56cc995d-9b5a-41f5-a719-92835f376d13@intel.com> (raw)
In-Reply-To: <20260105203833.1604585-1-samasth.norway.ananda@oracle.com>
On 1/5/26 1:38 PM, Samasth Norway Ananda wrote:
> Remove the outdated FIXME comment about switching to struct_group() and
> the associated BUILD_BUG_ON check. This work was already completed in
> commit 301e68dd9b9b ("cxl/core: Replace unions with struct_group()")
> which converted struct cxl_regs to use struct_group_tagged().
>
> The BUILD_BUG_ON was checking that anonymous union layout was preserved,
> but since struct_group() now handles this correctly, the compile-time
> check is no longer necessary.
>
> Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/pci.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index 0be4e508affe..3b2293dffb3f 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -912,13 +912,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> unsigned int i;
> bool irq_avail;
>
> - /*
> - * Double check the anonymous union trickery in struct cxl_regs
> - * FIXME switch to struct_group()
> - */
> - BUILD_BUG_ON(offsetof(struct cxl_regs, memdev) !=
> - offsetof(struct cxl_regs, device_regs.memdev));
> -
> rc = pcim_enable_device(pdev);
> if (rc)
> return rc;
next prev parent reply other threads:[~2026-01-06 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 20:38 [PATCH] cxl/pci: Remove outdated FIXME comment and BUILD_BUG_ON Samasth Norway Ananda
2026-01-06 17:55 ` Dave Jiang [this message]
2026-01-08 16:20 ` Jonathan Cameron
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=56cc995d-9b5a-41f5-a719-92835f376d13@intel.com \
--to=dave.jiang@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lison.schofield@intel.com \
--cc=samasth.norway.ananda@oracle.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