public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case
       [not found] <message-id-do-email-do-dan>
@ 2026-03-21 16:02 ` Marcos Andrade
  2026-03-21 16:02   ` [PATCH v2 1/3] " Marcos Andrade
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marcos Andrade @ 2026-03-21 16:02 UTC (permalink / raw)
  To: dan.carpenter; +Cc: gregkh, linux-staging, linux-kernel, Marcos Andrade

This series renames the CamelCase member names ChannelNum and ScanType
of struct rt_channel_info to their snake_case equivalents channel_num
and scan_type, updating all their usages across the driver.

Changes in v2:
- Fix incorrect member assignment in rtw_mlme_ext.c
  (channel_num was wrongly assigned from scan_type)

Marcos Andrade (3):
  staging: rtl8723bs: rename rt_channel_info members to snake_case
  staging: rtl8723bs: rename rt_channel_info members to snake_case
  staging: rtl8723bs: update rt_channel_info member usage to snake_case
    in wifi_reged.c

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 82 +++++++++----------
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  |  4 +-
 drivers/staging/rtl8723bs/os_dep/wifi_regd.c  |  4 +-
 3 files changed, 45 insertions(+), 45 deletions(-)

-- 
2.53.0


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

* [PATCH v2 1/3] staging: rtl8723bs: rename rt_channel_info members to snake_case
  2026-03-21 16:02 ` [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case Marcos Andrade
@ 2026-03-21 16:02   ` Marcos Andrade
  2026-03-21 16:02   ` [PATCH v2 2/3] " Marcos Andrade
  2026-03-31  6:50   ` [PATCH v2 0/3] " Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Marcos Andrade @ 2026-03-21 16:02 UTC (permalink / raw)
  To: dan.carpenter; +Cc: gregkh, linux-staging, linux-kernel, Marcos Andrade

Rename the CamelCase member names ChannelNum and ScanType of struct
rt_channel_info in rtw_mlme_ext.h to their snake_case equivalents
channel_num and scan_type.

While at it, fix a pre-existing whitespace issue inside the struct
flagged by checkpatch.pl.

This change brings the code in line with the kernel coding style
as described in Documentation/process/coding-style.rst.

No functional changes intended.

Signed-off-by: Marcos Andrade <marcosandrade95963@gmail.com>
---
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index afa5631a441a..998841ae5655 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -322,8 +322,8 @@ struct mlme_ext_info {
 
 /*  The channel information about this channel including joining, scanning, and power constraints. */
 struct rt_channel_info {
-	u8 		ChannelNum;		/*  The channel number. */
-	enum rt_scan_type	ScanType;		/*  Scan type such as passive or active scan. */
+	u8 channel_num;		/*  The channel number. */
+	enum rt_scan_type scan_type;		/*  Scan type such as passive or active scan. */
 };
 
 int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch);
-- 
2.53.0


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

* [PATCH v2 2/3] staging: rtl8723bs: rename rt_channel_info members to snake_case
  2026-03-21 16:02 ` [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case Marcos Andrade
  2026-03-21 16:02   ` [PATCH v2 1/3] " Marcos Andrade
@ 2026-03-21 16:02   ` Marcos Andrade
  2026-03-31  6:50   ` [PATCH v2 0/3] " Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Marcos Andrade @ 2026-03-21 16:02 UTC (permalink / raw)
  To: dan.carpenter; +Cc: gregkh, linux-staging, linux-kernel, Marcos Andrade

Replace all occurrences of the CamelCase member names ChannelNum and
ScanType in rtw_mlme_ext.c with their snake_case equivalents
channel_num and scan_type, as defined in struct rt_channel_info.

This change brings the code in line with the kernel coding style
as described in Documentation/process/coding-style.rst.

No functional changes intended.

Signed-off-by: Marcos Andrade <marcosandrade95963@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 82 +++++++++----------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index b1f20aa81efb..d8bf44eaa577 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -171,12 +171,12 @@ int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
 {
 	int i;
 
-	for (i = 0; ch_set[i].ChannelNum != 0; i++) {
-		if (ch == ch_set[i].ChannelNum)
+	for (i = 0; ch_set[i].channel_num != 0; i++) {
+		if (ch == ch_set[i].channel_num)
 			break;
 	}
 
-	if (i >= ch_set[i].ChannelNum)
+	if (i >= ch_set[i].channel_num)
 		return -1;
 	return i;
 }
@@ -261,7 +261,7 @@ static int has_channel(struct rt_channel_info *channel_set,
 	int i;
 
 	for (i = 0; i < chanset_size; i++)
-		if (channel_set[i].ChannelNum == chan)
+		if (channel_set[i].channel_num == chan)
 			return 1;
 
 	return 0;
@@ -340,22 +340,22 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
 
 	if (b2_4GBand) {
 		for (index = 0; index < RTW_ChannelPlan2G[Index2G].Len; index++) {
-			channel_set[chanset_size].ChannelNum = RTW_ChannelPlan2G[Index2G].Channel[index];
+			channel_set[chanset_size].channel_num = RTW_ChannelPlan2G[Index2G].Channel[index];
 
 			if ((ChannelPlan == RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN) ||/* Channel 1~11 is active, and 12~14 is passive */
 				(ChannelPlan == RT_CHANNEL_DOMAIN_GLOBAL_NULL)) {
-				if (channel_set[chanset_size].ChannelNum >= 1 && channel_set[chanset_size].ChannelNum <= 11)
-					channel_set[chanset_size].ScanType = SCAN_ACTIVE;
-				else if ((channel_set[chanset_size].ChannelNum  >= 12 && channel_set[chanset_size].ChannelNum  <= 14))
-					channel_set[chanset_size].ScanType  = SCAN_PASSIVE;
+				if (channel_set[chanset_size].channel_num >= 1 && channel_set[chanset_size].channel_num <= 11)
+					channel_set[chanset_size].scan_type = SCAN_ACTIVE;
+				else if ((channel_set[chanset_size].channel_num  >= 12 && channel_set[chanset_size].channel_num  <= 14))
+					channel_set[chanset_size].scan_type = SCAN_PASSIVE;
 			} else if (ChannelPlan == RT_CHANNEL_DOMAIN_WORLD_WIDE_13 ||
 				 Index2G == RT_CHANNEL_DOMAIN_2G_WORLD) { /*  channel 12~13, passive scan */
-				if (channel_set[chanset_size].ChannelNum <= 11)
-					channel_set[chanset_size].ScanType = SCAN_ACTIVE;
+				if (channel_set[chanset_size].channel_num <= 11)
+					channel_set[chanset_size].scan_type = SCAN_ACTIVE;
 				else
-					channel_set[chanset_size].ScanType = SCAN_PASSIVE;
+					channel_set[chanset_size].scan_type = SCAN_PASSIVE;
 			} else
-				channel_set[chanset_size].ScanType = SCAN_ACTIVE;
+				channel_set[chanset_size].scan_type = SCAN_ACTIVE;
 
 			chanset_size++;
 		}
@@ -4279,27 +4279,27 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
 		if (pregistrypriv->wireless_mode & WIRELESS_11G) {
 			do {
 				if ((i == MAX_CHANNEL_NUM) ||
-					(chplan_sta[i].ChannelNum == 0) ||
-					(chplan_sta[i].ChannelNum > 14))
+					(chplan_sta[i].channel_num == 0) ||
+					(chplan_sta[i].channel_num > 14))
 					break;
 
 				if ((j == chplan_ap.Len) || (chplan_ap.Channel[j] > 14))
 					break;
 
-				if (chplan_sta[i].ChannelNum == chplan_ap.Channel[j]) {
-					chplan_new[k].ChannelNum = chplan_ap.Channel[j];
-					chplan_new[k].ScanType = SCAN_ACTIVE;
+				if (chplan_sta[i].channel_num == chplan_ap.Channel[j]) {
+					chplan_new[k].channel_num = chplan_ap.Channel[j];
+					chplan_new[k].scan_type = SCAN_ACTIVE;
 					i++;
 					j++;
 					k++;
-				} else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) {
-					chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
-					chplan_new[k].ScanType = SCAN_PASSIVE;
+				} else if (chplan_sta[i].channel_num < chplan_ap.Channel[j]) {
+					chplan_new[k].channel_num = chplan_sta[i].channel_num;
+					chplan_new[k].scan_type = SCAN_PASSIVE;
 					i++;
 					k++;
-				} else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) {
-					chplan_new[k].ChannelNum = chplan_ap.Channel[j];
-					chplan_new[k].ScanType = SCAN_ACTIVE;
+				} else if (chplan_sta[i].channel_num > chplan_ap.Channel[j]) {
+					chplan_new[k].channel_num = chplan_ap.Channel[j];
+					chplan_new[k].scan_type = SCAN_ACTIVE;
 					j++;
 					k++;
 				}
@@ -4307,29 +4307,29 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
 
 			/*  change AP not support channel to Passive scan */
 			while ((i < MAX_CHANNEL_NUM) &&
-				(chplan_sta[i].ChannelNum != 0) &&
-				(chplan_sta[i].ChannelNum <= 14)) {
+				(chplan_sta[i].channel_num != 0) &&
+				(chplan_sta[i].channel_num <= 14)) {
 
-				chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
-				chplan_new[k].ScanType = SCAN_PASSIVE;
+				chplan_new[k].channel_num = chplan_sta[i].channel_num;
+				chplan_new[k].scan_type = SCAN_PASSIVE;
 				i++;
 				k++;
 			}
 
 			/*  add channel AP supported */
 			while ((j < chplan_ap.Len) && (chplan_ap.Channel[j] <= 14)) {
-				chplan_new[k].ChannelNum = chplan_ap.Channel[j];
-				chplan_new[k].ScanType = SCAN_ACTIVE;
+				chplan_new[k].channel_num = chplan_ap.Channel[j];
+				chplan_new[k].scan_type = SCAN_ACTIVE;
 				j++;
 				k++;
 			}
 		} else {
 			/*  keep original STA 2.4G channel plan */
 			while ((i < MAX_CHANNEL_NUM) &&
-				(chplan_sta[i].ChannelNum != 0) &&
-				(chplan_sta[i].ChannelNum <= 14)) {
-				chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
-				chplan_new[k].ScanType = chplan_sta[i].ScanType;
+				(chplan_sta[i].channel_num != 0) &&
+				(chplan_sta[i].channel_num <= 14)) {
+				chplan_new[k].channel_num = chplan_sta[i].channel_num;
+				chplan_new[k].scan_type = chplan_sta[i].scan_type;
 				i++;
 				k++;
 			}
@@ -4346,10 +4346,10 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
 	channel = bssid->configuration.ds_config;
 	chplan_new = pmlmeext->channel_set;
 	i = 0;
-	while ((i < MAX_CHANNEL_NUM) && (chplan_new[i].ChannelNum != 0)) {
-		if (chplan_new[i].ChannelNum == channel) {
-			if (chplan_new[i].ScanType == SCAN_PASSIVE)
-				chplan_new[i].ScanType = SCAN_ACTIVE;
+	while ((i < MAX_CHANNEL_NUM) && (chplan_new[i].channel_num != 0)) {
+		if (chplan_new[i].channel_num == channel) {
+			if (chplan_new[i].scan_type == SCAN_PASSIVE)
+				chplan_new[i].scan_type = SCAN_ACTIVE;
 			break;
 		}
 		i++;
@@ -5448,7 +5448,7 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
 
 			memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel));
 
-			if (pmlmeext->channel_set[set_idx].ScanType == SCAN_PASSIVE)
+			if (pmlmeext->channel_set[set_idx].scan_type == SCAN_PASSIVE)
 				out[j].flags |= RTW_IEEE80211_CHAN_PASSIVE_SCAN;
 
 			j++;
@@ -5469,9 +5469,9 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
 				break;
 			}
 
-			out[j].hw_value = pmlmeext->channel_set[i].ChannelNum;
+			out[j].hw_value = pmlmeext->channel_set[i].channel_num;
 
-			if (pmlmeext->channel_set[i].ScanType == SCAN_PASSIVE)
+			if (pmlmeext->channel_set[i].scan_type == SCAN_PASSIVE)
 				out[j].flags |= RTW_IEEE80211_CHAN_PASSIVE_SCAN;
 
 			j++;
-- 
2.53.0


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

* Re: [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case
  2026-03-21 16:02 ` [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case Marcos Andrade
  2026-03-21 16:02   ` [PATCH v2 1/3] " Marcos Andrade
  2026-03-21 16:02   ` [PATCH v2 2/3] " Marcos Andrade
@ 2026-03-31  6:50   ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-03-31  6:50 UTC (permalink / raw)
  To: Marcos Andrade; +Cc: dan.carpenter, linux-staging, linux-kernel

On Sat, Mar 21, 2026 at 04:02:15PM +0000, Marcos Andrade wrote:
> This series renames the CamelCase member names ChannelNum and ScanType
> of struct rt_channel_info to their snake_case equivalents channel_num
> and scan_type, updating all their usages across the driver.
> 
> Changes in v2:
> - Fix incorrect member assignment in rtw_mlme_ext.c
>   (channel_num was wrongly assigned from scan_type)
> 
> Marcos Andrade (3):
>   staging: rtl8723bs: rename rt_channel_info members to snake_case
>   staging: rtl8723bs: rename rt_channel_info members to snake_case

You have different patches with identical subject lines, which is not a
good idea.  Please make them unique.

thanks,

greg k-h

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

end of thread, other threads:[~2026-03-31  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <message-id-do-email-do-dan>
2026-03-21 16:02 ` [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case Marcos Andrade
2026-03-21 16:02   ` [PATCH v2 1/3] " Marcos Andrade
2026-03-21 16:02   ` [PATCH v2 2/3] " Marcos Andrade
2026-03-31  6:50   ` [PATCH v2 0/3] " Greg KH

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