public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3] staging: rtl8723bs: fix CamelCase warning for READ_MACREG
@ 2026-03-31  4:39 Xiyuan Guo
  2026-03-31  8:41 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Xiyuan Guo @ 2026-03-31  4:39 UTC (permalink / raw)
  To: gregkh; +Cc: error27, b9788213, linux-staging, linux-kernel, Xiyuan Guo

Rename the _Read_MACREG macro to READ_MACREG to resolve the checkpatch.pl
"Avoid CamelCase" warning. This aligns the macro naming with the kernel
coding style guidelines.

Signed-off-by: Xiyuan Guo <tommyguo039@gmail.com>
---
Changes in v3:
  - Dropped unrelated whitespace modifications caught by maintainers.
  - Rebased onto staging-next.

 drivers/staging/rtl8723bs/core/rtw_cmd.c         | 2 +-
 drivers/staging/rtl8723bs/include/rtw_cmd.h      | 2 +-
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index c1185c25ed36..eb902c810ac8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -11,7 +11,7 @@
 #include <linux/delay.h>
 
 static struct _cmd_callback rtw_cmd_callback[] = {
-	{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
+	{GEN_CMD_CODE(READ_MACREG), NULL}, /*0*/
 	{GEN_CMD_CODE(_Write_MACREG), NULL},
 	{GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
 	{GEN_CMD_CODE(_Write_BBREG), NULL},
diff --git a/drivers/staging/rtl8723bs/include/rtw_cmd.h b/drivers/staging/rtl8723bs/include/rtw_cmd.h
index c4c3edee809d..d204426799ef 100644
--- a/drivers/staging/rtl8723bs/include/rtw_cmd.h
+++ b/drivers/staging/rtl8723bs/include/rtw_cmd.h
@@ -630,7 +630,7 @@ struct _cmd_callback {
 };
 
 enum {
-	GEN_CMD_CODE(_Read_MACREG),	/*0*/
+	GEN_CMD_CODE(READ_MACREG),	/*0*/
 	GEN_CMD_CODE(_Write_MACREG),
 	GEN_CMD_CODE(_Read_BBREG),
 	GEN_CMD_CODE(_Write_BBREG),
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 95769f90d196..d14cabd5e47c 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -679,7 +679,7 @@ void rtw_dummy_event_callback(struct adapter *adapter, u8 *pbuf);
 void rtw_fwdbg_event_callback(struct adapter *adapter, u8 *pbuf);
 
 enum {
-	GEN_EVT_CODE(_Read_MACREG) = 0, /*0*/
+	GEN_EVT_CODE(READ_MACREG) = 0, /*0*/
 	GEN_EVT_CODE(_Read_BBREG),
 	GEN_EVT_CODE(_Read_RFREG),
 	GEN_EVT_CODE(_Read_EEPROM),
-- 
2.53.0


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

* Re: [PATCH v3] staging: rtl8723bs: fix CamelCase warning for READ_MACREG
  2026-03-31  4:39 [PATCH v3] staging: rtl8723bs: fix CamelCase warning for READ_MACREG Xiyuan Guo
@ 2026-03-31  8:41 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2026-03-31  8:41 UTC (permalink / raw)
  To: Xiyuan Guo; +Cc: error27, b9788213, linux-staging, linux-kernel

On Tue, Mar 31, 2026 at 12:39:54AM -0400, Xiyuan Guo wrote:
> Rename the _Read_MACREG macro to READ_MACREG to resolve the checkpatch.pl
> "Avoid CamelCase" warning. This aligns the macro naming with the kernel
> coding style guidelines.
> 
> Signed-off-by: Xiyuan Guo <tommyguo039@gmail.com>
> ---
> Changes in v3:
>   - Dropped unrelated whitespace modifications caught by maintainers.
>   - Rebased onto staging-next.
> 
>  drivers/staging/rtl8723bs/core/rtw_cmd.c         | 2 +-
>  drivers/staging/rtl8723bs/include/rtw_cmd.h      | 2 +-
>  drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> index c1185c25ed36..eb902c810ac8 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> @@ -11,7 +11,7 @@
>  #include <linux/delay.h>
>  
>  static struct _cmd_callback rtw_cmd_callback[] = {
> -	{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
> +	{GEN_CMD_CODE(READ_MACREG), NULL}, /*0*/

Ok, but now what does the result look like?  You are creating a function
name called cmdREAD_MACREG(), is that intended?

That's why those leading '_' characters are there.

How about unwinding this mess of function pointers and #defines
entirely?  It's not needed and is just yet-another layer of indirection
in this driver that needs to be removed.

thanks,

greg k-h

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31  4:39 [PATCH v3] staging: rtl8723bs: fix CamelCase warning for READ_MACREG Xiyuan Guo
2026-03-31  8:41 ` Greg KH

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