public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c
@ 2026-02-05 12:09 Haroen Tmimi
  2026-02-05 15:53 ` Ethan Tidmore
  2026-02-07 13:40 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Haroen Tmimi @ 2026-02-05 12:09 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Haroen Tmimi

Make the _action_public_str array "static const char * const".

This ensures the array entries are read-only, preventing accidental
modification of the pointers.

Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 92b12a13d27c..febc14de6bc0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1139,7 +1139,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
 	return true;
 }
 
-static const char *_action_public_str[] = {
+static const char * const _action_public_str[] = {
 	"ACT_PUB_BSSCOEXIST",
 	"ACT_PUB_DSE_ENABLE",
 	"ACT_PUB_DSE_DEENABLE",
-- 
2.53.0


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

* Re: [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c
  2026-02-05 12:09 [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c Haroen Tmimi
@ 2026-02-05 15:53 ` Ethan Tidmore
  2026-02-07 13:40 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Ethan Tidmore @ 2026-02-05 15:53 UTC (permalink / raw)
  To: Haroen Tmimi, gregkh; +Cc: linux-staging, linux-kernel

On Thu Feb 5, 2026 at 6:09 AM CST, Haroen Tmimi wrote:
> Make the _action_public_str array "static const char * const".
>
> This ensures the array entries are read-only, preventing accidental
> modification of the pointers.
>
> Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>

Looks good to me.

Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>

ET

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

* Re: [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c
  2026-02-05 12:09 [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c Haroen Tmimi
  2026-02-05 15:53 ` Ethan Tidmore
@ 2026-02-07 13:40 ` Greg KH
  2026-02-07 14:06   ` Haroen Tmimi
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2026-02-07 13:40 UTC (permalink / raw)
  To: Haroen Tmimi; +Cc: linux-staging, linux-kernel

On Thu, Feb 05, 2026 at 01:09:09PM +0100, Haroen Tmimi wrote:
> Make the _action_public_str array "static const char * const".
> 
> This ensures the array entries are read-only, preventing accidental
> modification of the pointers.
> 
> Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
> index 92b12a13d27c..febc14de6bc0 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
> @@ -1139,7 +1139,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
>  	return true;
>  }
>  
> -static const char *_action_public_str[] = {
> +static const char * const _action_public_str[] = {
>  	"ACT_PUB_BSSCOEXIST",
>  	"ACT_PUB_DSE_ENABLE",
>  	"ACT_PUB_DSE_DEENABLE",
> -- 
> 2.53.0
> 
> 

Someone already sent this same change before you did, sorry.

Why all of the same fixes for the same driver are happening at once?
Did a class just happen that encouraged people to make these types of
changes to the driver?

thanks,

greg k-h

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

* Re: [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c
  2026-02-07 13:40 ` Greg KH
@ 2026-02-07 14:06   ` Haroen Tmimi
  0 siblings, 0 replies; 4+ messages in thread
From: Haroen Tmimi @ 2026-02-07 14:06 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-staging, linux-kernel

Hi Greg,

Thanks for the update. To answer your question. No, this isn't an
assignment. I am an Electrical Engineering student learning kernel
development in my spare time. I picked this driver simply because it
looked active in the staging mailing list and it was recommended on a
YouTube video I had seen, which I guess explains why others are
contributing as well.

I'll check the archives more carefully next time to avoid duplicates.

Best regards,
Haroen Tmimi


Op za 7 feb 2026 om 14:40 schreef Greg KH <gregkh@linuxfoundation.org>:
>
> On Thu, Feb 05, 2026 at 01:09:09PM +0100, Haroen Tmimi wrote:
> > Make the _action_public_str array "static const char * const".
> >
> > This ensures the array entries are read-only, preventing accidental
> > modification of the pointers.
> >
> > Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
> > index 92b12a13d27c..febc14de6bc0 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
> > @@ -1139,7 +1139,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
> >       return true;
> >  }
> >
> > -static const char *_action_public_str[] = {
> > +static const char * const _action_public_str[] = {
> >       "ACT_PUB_BSSCOEXIST",
> >       "ACT_PUB_DSE_ENABLE",
> >       "ACT_PUB_DSE_DEENABLE",
> > --
> > 2.53.0
> >
> >
>
> Someone already sent this same change before you did, sorry.
>
> Why all of the same fixes for the same driver are happening at once?
> Did a class just happen that encouraged people to make these types of
> changes to the driver?
>
> thanks,
>
> greg k-h

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

end of thread, other threads:[~2026-02-07 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 12:09 [PATCH v2] staging: rtl8723bs: constify _action_public_str in rtw_ieee80211.c Haroen Tmimi
2026-02-05 15:53 ` Ethan Tidmore
2026-02-07 13:40 ` Greg KH
2026-02-07 14:06   ` Haroen Tmimi

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