All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u avoid flex array of flex array
@ 2021-02-28  1:06 ` Darryl T. Agostinelli
  0 siblings, 0 replies; 6+ messages in thread
From: Darryl T. Agostinelli @ 2021-02-28  1:06 UTC (permalink / raw)
  To: devel; +Cc: gregkh, linux-kernel, Darryl T. Agostinelli

Undo the flex array in struct ieee80211_info_element.  It is used as the flex
array type in other structs (creating a flex array of flex arrays) making
sparse unhappy.  This change maintains the intent of the code and satisfies
sparse.

Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 39f4ddd86796..43bb7aeb35e3 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -951,7 +951,7 @@ struct rtl_80211_hdr_4addrqos {
 struct ieee80211_info_element {
 	u8 id;
 	u8 len;
-	u8 data[];
+	u8 data[0];
 } __packed;
 
 struct ieee80211_authentication {
-- 
2.29.2


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

* [PATCH] staging: rtl8192u avoid flex array of flex array
@ 2021-02-28  1:06 ` Darryl T. Agostinelli
  0 siblings, 0 replies; 6+ messages in thread
From: Darryl T. Agostinelli @ 2021-02-28  1:06 UTC (permalink / raw)
  To: devel; +Cc: gregkh, Darryl T. Agostinelli, linux-kernel

Undo the flex array in struct ieee80211_info_element.  It is used as the flex
array type in other structs (creating a flex array of flex arrays) making
sparse unhappy.  This change maintains the intent of the code and satisfies
sparse.

Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 39f4ddd86796..43bb7aeb35e3 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -951,7 +951,7 @@ struct rtl_80211_hdr_4addrqos {
 struct ieee80211_info_element {
 	u8 id;
 	u8 len;
-	u8 data[];
+	u8 data[0];
 } __packed;
 
 struct ieee80211_authentication {
-- 
2.29.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8192u avoid flex array of flex array
  2021-02-28  1:06 ` Darryl T. Agostinelli
@ 2021-03-01  6:33   ` Dan Carpenter
  -1 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-03-01  6:33 UTC (permalink / raw)
  To: Darryl T. Agostinelli; +Cc: devel, gregkh, linux-kernel

On Sat, Feb 27, 2021 at 07:06:14PM -0600, Darryl T. Agostinelli wrote:
> Undo the flex array in struct ieee80211_info_element.  It is used as the flex
> array type in other structs (creating a flex array of flex arrays) making
> sparse unhappy.  This change maintains the intent of the code and satisfies
> sparse.
> 
> Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> index 39f4ddd86796..43bb7aeb35e3 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> @@ -951,7 +951,7 @@ struct rtl_80211_hdr_4addrqos {
>  struct ieee80211_info_element {
>  	u8 id;
>  	u8 len;
> -	u8 data[];
> +	u8 data[0];

Nah...  Just ignore Sparse on this.

regards,
dan carpenter


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

* Re: [PATCH] staging: rtl8192u avoid flex array of flex array
@ 2021-03-01  6:33   ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-03-01  6:33 UTC (permalink / raw)
  To: Darryl T. Agostinelli; +Cc: devel, gregkh, linux-kernel

On Sat, Feb 27, 2021 at 07:06:14PM -0600, Darryl T. Agostinelli wrote:
> Undo the flex array in struct ieee80211_info_element.  It is used as the flex
> array type in other structs (creating a flex array of flex arrays) making
> sparse unhappy.  This change maintains the intent of the code and satisfies
> sparse.
> 
> Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> index 39f4ddd86796..43bb7aeb35e3 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> @@ -951,7 +951,7 @@ struct rtl_80211_hdr_4addrqos {
>  struct ieee80211_info_element {
>  	u8 id;
>  	u8 len;
> -	u8 data[];
> +	u8 data[0];

Nah...  Just ignore Sparse on this.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8192u avoid flex array of flex array
  2021-02-28  1:06 ` Darryl T. Agostinelli
@ 2021-03-02 14:18   ` Greg KH
  -1 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-03-02 14:18 UTC (permalink / raw)
  To: Darryl T. Agostinelli; +Cc: devel, linux-kernel

On Sat, Feb 27, 2021 at 07:06:14PM -0600, Darryl T. Agostinelli wrote:
> Undo the flex array in struct ieee80211_info_element.  It is used as the flex
> array type in other structs (creating a flex array of flex arrays) making
> sparse unhappy.  This change maintains the intent of the code and satisfies
> sparse.

We have been trying to convert the kernel to use the [] style over time,
please don't move backwards on this.  There are loads of commits by
Gustavo in the tree that show this work.

thanks,

greg k-h

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

* Re: [PATCH] staging: rtl8192u avoid flex array of flex array
@ 2021-03-02 14:18   ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-03-02 14:18 UTC (permalink / raw)
  To: Darryl T. Agostinelli; +Cc: devel, linux-kernel

On Sat, Feb 27, 2021 at 07:06:14PM -0600, Darryl T. Agostinelli wrote:
> Undo the flex array in struct ieee80211_info_element.  It is used as the flex
> array type in other structs (creating a flex array of flex arrays) making
> sparse unhappy.  This change maintains the intent of the code and satisfies
> sparse.

We have been trying to convert the kernel to use the [] style over time,
please don't move backwards on this.  There are loads of commits by
Gustavo in the tree that show this work.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2021-03-02 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28  1:06 [PATCH] staging: rtl8192u avoid flex array of flex array Darryl T. Agostinelli
2021-02-28  1:06 ` Darryl T. Agostinelli
2021-03-01  6:33 ` Dan Carpenter
2021-03-01  6:33   ` Dan Carpenter
2021-03-02 14:18 ` Greg KH
2021-03-02 14:18   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.