* [PATCH] cxl/pci: Remove outdated FIXME comment and BUILD_BUG_ON
@ 2026-01-05 20:38 Samasth Norway Ananda
2026-01-06 17:55 ` Dave Jiang
0 siblings, 1 reply; 3+ messages in thread
From: Samasth Norway Ananda @ 2026-01-05 20:38 UTC (permalink / raw)
To: dave, jonathan.cameron, dave.jiang, lison.schofield,
vishal.l.verma
Cc: ira.weiny, dan.j.williams, linux-cxl, linux-kernel
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>
---
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;
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cxl/pci: Remove outdated FIXME comment and BUILD_BUG_ON
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
2026-01-08 16:20 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jiang @ 2026-01-06 17:55 UTC (permalink / raw)
To: Samasth Norway Ananda, dave, jonathan.cameron, lison.schofield,
vishal.l.verma
Cc: ira.weiny, dan.j.williams, linux-cxl, linux-kernel
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;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cxl/pci: Remove outdated FIXME comment and BUILD_BUG_ON
2026-01-06 17:55 ` Dave Jiang
@ 2026-01-08 16:20 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-01-08 16:20 UTC (permalink / raw)
To: Dave Jiang
Cc: Samasth Norway Ananda, dave, lison.schofield, vishal.l.verma,
ira.weiny, dan.j.williams, linux-cxl, linux-kernel
On Tue, 6 Jan 2026 10:55:13 -0700
Dave Jiang <dave.jiang@intel.com> wrote:
> 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>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-08 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-01-08 16:20 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox