public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: rename variables to snake_case
@ 2026-03-27 20:36 david
  2026-03-29  6:43 ` Bera Yüzlü
  0 siblings, 1 reply; 3+ messages in thread
From: david @ 2026-03-27 20:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Michael Straube, Andy Shevchenko, Ethan Tidmore, Dan Carpenter,
	David Holland, linux-staging, linux-kernel

From: David Holland <david@cardinalsystem.net>

The Linux kernel coding style guidelines prohibit the use of CamelCase
variable names. All variables should be snakecase.

Rename the 'ChipVersion' parameter to 'chip_version' and the
'AutoLoadFail' parameter to 'auto_load_fail' in hal_com.c to adhere to
the standard snakecase naming convention.

Signed-off-by: David Holland <david@cardinalsystem.net>
---

Hey everyone,

This is my first attempt at submitting a patch into the Linux kernel. I always wanted to try to get my own patch submitted into the kernel so I was scrolling through the codebase and found some incorrect naming styles. I corrected the variables name that were using camelCase to use the traditional snakecase.

Thanks for reviewing,
David
 drivers/staging/rtl8723bs/hal/hal_com.c | 38 ++++++++++++-------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 31b3e880ae6a..4bee338073c4 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -31,44 +31,44 @@ void rtw_hal_data_deinit(struct adapter *padapter)
 }
 
 
-void dump_chip_info(struct hal_version	ChipVersion)
+void dump_chip_info(struct hal_version	chip_version)
 {
 	char buf[128];
 	size_t cnt = 0;
 
 	cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "Chip Version Info: CHIP_8723B_%s_",
-			IS_NORMAL_CHIP(ChipVersion) ? "Normal_Chip" : "Test_Chip");
+			IS_NORMAL_CHIP(chip_version) ? "Normal_Chip" : "Test_Chip");
 
-	if (IS_CHIP_VENDOR_TSMC(ChipVersion))
+	if (IS_CHIP_VENDOR_TSMC(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "TSMC_");
-	else if (IS_CHIP_VENDOR_UMC(ChipVersion))
+	else if (IS_CHIP_VENDOR_UMC(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "UMC_");
-	else if (IS_CHIP_VENDOR_SMIC(ChipVersion))
+	else if (IS_CHIP_VENDOR_SMIC(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "SMIC_");
 
-	if (IS_A_CUT(ChipVersion))
+	if (IS_A_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "A_CUT_");
-	else if (IS_B_CUT(ChipVersion))
+	else if (IS_B_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "B_CUT_");
-	else if (IS_C_CUT(ChipVersion))
+	else if (IS_C_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "C_CUT_");
-	else if (IS_D_CUT(ChipVersion))
+	else if (IS_D_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "D_CUT_");
-	else if (IS_E_CUT(ChipVersion))
+	else if (IS_E_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "E_CUT_");
-	else if (IS_I_CUT(ChipVersion))
+	else if (IS_I_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "I_CUT_");
-	else if (IS_J_CUT(ChipVersion))
+	else if (IS_J_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "J_CUT_");
-	else if (IS_K_CUT(ChipVersion))
+	else if (IS_K_CUT(chip_version))
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "K_CUT_");
 	else
 		cnt += scnprintf(buf + cnt, sizeof(buf) - cnt,
-				"UNKNOWN_CUT(%d)_", ChipVersion.CUTVersion);
+				"UNKNOWN_CUT(%d)_", chip_version.CUTVersion);
 
 	cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "1T1R_");
 
-	cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n", ChipVersion.ROMVer);
+	cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n", chip_version.ROMVer);
 }
 
 
@@ -86,7 +86,7 @@ void dump_chip_info(struct hal_version	ChipVersion)
  *					BIT[6:0] Channel Plan
  *sw_channel_plan		channel plan from SW (registry/module param)
  *def_channel_plan	channel plan used when HW/SW both invalid
- *AutoLoadFail		efuse autoload fail or not
+ *auto_load_fail		efuse autoload fail or not
  *
  * Return:
  *Final channel plan decision
@@ -97,7 +97,7 @@ u8 hal_com_config_channel_plan(
 	u8 hw_channel_plan,
 	u8 sw_channel_plan,
 	u8 def_channel_plan,
-	bool AutoLoadFail
+	bool auto_load_fail
 )
 {
 	struct hal_com_data *pHalData;
@@ -108,9 +108,9 @@ u8 hal_com_config_channel_plan(
 	chnlPlan = def_channel_plan;
 
 	if (0xFF == hw_channel_plan)
-		AutoLoadFail = true;
+		auto_load_fail = true;
 
-	if (!AutoLoadFail) {
+	if (!auto_load_fail) {
 		u8 hw_chnlPlan;
 
 		hw_chnlPlan = hw_channel_plan & (~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
-- 
2.53.0


[EXTERNAL EMAIL]

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

* Re: [PATCH] staging: rtl8723bs: rename variables to snake_case
  2026-03-27 20:36 [PATCH] staging: rtl8723bs: rename variables to snake_case david
@ 2026-03-29  6:43 ` Bera Yüzlü
  2026-03-29  7:32   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Bera Yüzlü @ 2026-03-29  6:43 UTC (permalink / raw)
  To: david
  Cc: andriy.shevchenko, dan.carpenter, ethantidmore06, gregkh,
	linux-kernel, linux-staging, straube.linux

on Fri, 27 Mar 2026 16:36:36 -0400, David Holland wrote:
> From: David Holland <david@cardinalsystem.net>

You don't need that.

> The Linux kernel coding style guidelines prohibit the use of CamelCase
> variable names. All variables should be snakecase.
> 
> Rename the 'ChipVersion' parameter to 'chip_version' and the
> 'AutoLoadFail' parameter to 'auto_load_fail' in hal_com.c to adhere to
> the standard snakecase naming convention.
> 
> Signed-off-by: David Holland <david@cardinalsystem.net>
> ---
> 
> Hey everyone,
> 
> This is my first attempt at submitting a patch into the Linux kernel. I always wanted to try to get my own patch submitted into the kernel so I was scrolling through the codebase and found some incorrect naming styles. I corrected the variables name that were using camelCase to use the traditional snakecase.
> 
> Thanks for reviewing,
> David

Wrap your lines, please.

Thanks,
Bera

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

* Re: [PATCH] staging: rtl8723bs: rename variables to snake_case
  2026-03-29  6:43 ` Bera Yüzlü
@ 2026-03-29  7:32   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2026-03-29  7:32 UTC (permalink / raw)
  To: Bera Yüzlü
  Cc: david, andriy.shevchenko, dan.carpenter, ethantidmore06,
	linux-kernel, linux-staging, straube.linux

On Sun, Mar 29, 2026 at 09:43:34AM +0300, Bera Yüzlü wrote:
> on Fri, 27 Mar 2026 16:36:36 -0400, David Holland wrote:
> > From: David Holland <david@cardinalsystem.net>
> 
> You don't need that.

But it is fine to use, that is not an issue to complain about here :)

thanks,

greg k-h

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

end of thread, other threads:[~2026-03-29  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 20:36 [PATCH] staging: rtl8723bs: rename variables to snake_case david
2026-03-29  6:43 ` Bera Yüzlü
2026-03-29  7:32   ` Greg KH

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