linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: make read-only array EWC11NHTCap static const
@ 2022-04-14 10:18 Colin Ian King
  2022-04-14 10:26 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-04-14 10:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging; +Cc: kernel-janitors, linux-kernel

Don't populate the read-only array EWC11NHTCap on the stack but instead
make it static const. Also makes the object code a little smaller. Move
comment to clean up checkpatch warning.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index 358c35d9589c..b4cbe499ba37 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -480,7 +480,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	}
 	memset(posHTCap, 0, *len);
 	if (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC) {
-		u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	// For 11n EWC definition, 2007.07.17, by Emily
+		/* For 11n EWC definition, 2007.07.17, by Emily */
+		static const u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
 		memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
 		pCapELE = (struct ht_capability_ele *)&posHTCap[4];
-- 
2.35.1


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

* Re: [PATCH] staging: rtl8192u: make read-only array EWC11NHTCap static const
  2022-04-14 10:18 [PATCH] staging: rtl8192u: make read-only array EWC11NHTCap static const Colin Ian King
@ 2022-04-14 10:26 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-04-14 10:26 UTC (permalink / raw)
  To: Colin Ian King; +Cc: linux-staging, kernel-janitors, linux-kernel

On Thu, Apr 14, 2022 at 11:18:38AM +0100, Colin Ian King wrote:
> Don't populate the read-only array EWC11NHTCap on the stack but instead
> make it static const. Also makes the object code a little smaller. Move
> comment to clean up checkpatch warning.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
> index 358c35d9589c..b4cbe499ba37 100644
> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
> +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
> @@ -480,7 +480,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
>  	}
>  	memset(posHTCap, 0, *len);
>  	if (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC) {
> -		u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	// For 11n EWC definition, 2007.07.17, by Emily
> +		/* For 11n EWC definition, 2007.07.17, by Emily */

This is not needed anymore, you know this...

Just delete it please.

thanks,

greg k-h

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

end of thread, other threads:[~2022-04-14 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 10:18 [PATCH] staging: rtl8192u: make read-only array EWC11NHTCap static const Colin Ian King
2022-04-14 10:26 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).