[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56cc995d-9b5a-41f5-a719-92835f376d13@intel.com>
Date: Tue, 6 Jan 2026 10:55:13 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Samasth Norway Ananda <samasth.norway.ananda@...cle.com>,
dave@...olabs.net, jonathan.cameron@...wei.com, lison.schofield@...el.com,
vishal.l.verma@...el.com
Cc: ira.weiny@...el.com, dan.j.williams@...el.com, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cxl/pci: Remove outdated FIXME comment and BUILD_BUG_ON
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@...cle.com>
Reviewed-by: Dave Jiang <dave.jiang@...el.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;
Powered by blists - more mailing lists