Linux CXL
 help / color / mirror / Atom feed
* [PATCH] cxl: Add comment about 'cxl_root_decoder' and flex array
@ 2025-06-10 17:54 Dave Jiang
  2025-06-11 11:19 ` Li Ming
  2025-06-11 15:40 ` Dave Jiang
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Jiang @ 2025-06-10 17:54 UTC (permalink / raw)
  To: linux-cxl
  Cc: dave, jonathan.cameron, alison.schofield, vishal.l.verma,
	ira.weiny, dan.j.williams

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>
---
 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
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] cxl: Add comment about 'cxl_root_decoder' and flex array
  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
  2025-06-11 15:40 ` Dave Jiang
  1 sibling, 1 reply; 4+ messages in thread
From: Li Ming @ 2025-06-11 11:19 UTC (permalink / raw)
  To: Dave Jiang
  Cc: dave, jonathan.cameron, alison.schofield, vishal.l.verma,
	ira.weiny, dan.j.williams, linux-cxl

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>
> ---
>  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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cxl: Add comment about 'cxl_root_decoder' and flex array
  2025-06-11 11:19 ` Li Ming
@ 2025-06-11 13:28   ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2025-06-11 13:28 UTC (permalink / raw)
  To: Li Ming
  Cc: Dave Jiang, dave, alison.schofield, vishal.l.verma, ira.weiny,
	dan.j.williams, linux-cxl

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  
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cxl: Add comment about 'cxl_root_decoder' and flex array
  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 15:40 ` Dave Jiang
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2025-06-11 15:40 UTC (permalink / raw)
  To: linux-cxl
  Cc: dave, jonathan.cameron, alison.schofield, vishal.l.verma,
	ira.weiny, dan.j.williams



On 6/10/25 10: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>

Applied to cxl/next
> ---
>  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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-11 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-06-11 15:40 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox