linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan and fix index name
@ 2025-07-18  1:59 Vivek BalachandharTN
  2025-07-18  6:34 ` Greg KH
  2025-07-18  7:13 ` [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan Vivek BalachandharTN
  0 siblings, 2 replies; 3+ messages in thread
From: Vivek BalachandharTN @ 2025-07-18  1:59 UTC (permalink / raw)
  To: gregkh, linux-kernel, linux-staging, vivek.balachandhar

This patch renames the global array ChannelPlan to channel_plan
to follow Linux kernel coding style. Also renamed the index
variable from channel_plan to chan_plan_idx to avoid
shadowing and improve readability.

v2:
- Fixed Cc list to include Greg and staging list

v3:
- Removed EXTRAVERSION = -vivek from Makefile.

v4:
- Tested and verified Makefile EXTRAVERSION removal does not break build
- Removed EXTRAVERSION = -vivek to keep version clean

Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
---
 Makefile                               |  2 +-
 drivers/staging/rtl8192u/r8192U_core.c | 16 +++++++++-------
 init/main.c                            |  1 +
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 997b67722..a31bb7e1c 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 VERSION = 6
 PATCHLEVEL = 1
 SUBLEVEL = 0
-EXTRAVERSION =
+EXTRAVERSION = 
 NAME = Hurr durr I'ma ninja sloth
 
 # *DOCUMENTATION*
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 0a60ef201..b449d0d96 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -120,7 +120,7 @@ struct CHANNEL_LIST {
 	u8	Len;
 };
 
-static struct CHANNEL_LIST ChannelPlan[] = {
+static struct CHANNEL_LIST channel_plan[] = {
 	/* FCC */
 	{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 24},
 	/* IC */
@@ -145,12 +145,12 @@ static struct CHANNEL_LIST ChannelPlan[] = {
 	{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14}
 };
 
-static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
+static void rtl819x_set_channel_map(u8 chan_plan_idx, struct r8192_priv *priv)
 {
 	int i, max_chan = -1, min_chan = -1;
 	struct ieee80211_device *ieee = priv->ieee80211;
 
-	switch (channel_plan) {
+	switch (chan_plan_idx) {
 	case COUNTRY_CODE_FCC:
 	case COUNTRY_CODE_IC:
 	case COUNTRY_CODE_ETSI:
@@ -172,15 +172,17 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
 				 "unknown rf chip, can't set channel map in function:%s()\n",
 				 __func__);
 		}
-		if (ChannelPlan[channel_plan].Len != 0) {
+		if (channel_plan[chan_plan_idx].Len != 0) {
 			/* Clear old channel map */
 			memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
 			       sizeof(GET_DOT11D_INFO(ieee)->channel_map));
 			/* Set new channel map */
-			for (i = 0; i < ChannelPlan[channel_plan].Len; i++) {
-				if (ChannelPlan[channel_plan].Channel[i] < min_chan || ChannelPlan[channel_plan].Channel[i] > max_chan)
+			for (i = 0; i < channel_plan[chan_plan_idx].Len; i++) {
+				if (channel_plan[chan_plan_idx].Channel[i] < min_chan ||
+					channel_plan[chan_plan_idx].Channel[i] > max_chan)
 					break;
-				GET_DOT11D_INFO(ieee)->channel_map[ChannelPlan[channel_plan].Channel[i]] = 1;
+				GET_DOT11D_INFO(ieee)->channel_map
+					[channel_plan[chan_plan_idx].Channel[i]] = 1;
 			}
 		}
 		break;
diff --git a/init/main.c b/init/main.c
index aa21add5f..648589720 100644
--- a/init/main.c
+++ b/init/main.c
@@ -680,6 +680,7 @@ static void __init setup_command_line(char *command_line)
 
 static __initdata DECLARE_COMPLETION(kthreadd_done);
 
+
 noinline void __ref rest_init(void)
 {
 	struct task_struct *tsk;
-- 
2.39.5


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

* Re: [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan and fix index name
  2025-07-18  1:59 [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan and fix index name Vivek BalachandharTN
@ 2025-07-18  6:34 ` Greg KH
  2025-07-18  7:13 ` [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan Vivek BalachandharTN
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-07-18  6:34 UTC (permalink / raw)
  To: Vivek BalachandharTN; +Cc: linux-kernel, linux-staging

On Fri, Jul 18, 2025 at 01:59:25AM +0000, Vivek BalachandharTN wrote:
> This patch renames the global array ChannelPlan to channel_plan
> to follow Linux kernel coding style. Also renamed the index
> variable from channel_plan to chan_plan_idx to avoid
> shadowing and improve readability.
> 
> v2:
> - Fixed Cc list to include Greg and staging list
> 
> v3:
> - Removed EXTRAVERSION = -vivek from Makefile.
> 
> v4:
> - Tested and verified Makefile EXTRAVERSION removal does not break build
> - Removed EXTRAVERSION = -vivek to keep version clean
> 
> Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
> ---
>  Makefile                               |  2 +-

Why are you modifying Makefile and main.c for the whole kernel when you
are just making a coding style change for a single driver file?

Also, please read the documentation for how to properly document your
version changes, they go below the --- line, right?

thanks,

greg k-h

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

* Re: [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan
  2025-07-18  1:59 [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan and fix index name Vivek BalachandharTN
  2025-07-18  6:34 ` Greg KH
@ 2025-07-18  7:13 ` Vivek BalachandharTN
  1 sibling, 0 replies; 3+ messages in thread
From: Vivek BalachandharTN @ 2025-07-18  7:13 UTC (permalink / raw)
  To: vivek.balachandhar; +Cc: gregkh, linux-kernel, linux-staging

Hi Greg,

Thanks for the review and guidance.

Apologies for the earlier mistakes. I’ve addressed your comments in v5:
- Dropped unrelated changes to Makefile and init/main.c

v5 has been posted here:
https://lore.kernel.org/all/20250718025206.171361-1-vivek.balachandhar@gmail.com/ (cover letter)
https://lore.kernel.org/all/20250718025206.171361-2-vivek.balachandhar@gmail.com/ (actual patch)

Thanks again for your time and feedback!

Best regards,
Vivek BalachandharTN

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

end of thread, other threads:[~2025-07-18  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18  1:59 [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan and fix index name Vivek BalachandharTN
2025-07-18  6:34 ` Greg KH
2025-07-18  7:13 ` [PATCH v4] staging: rtl8192u: Rename ChannelPlan to channel_plan Vivek BalachandharTN

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