Re: [PATCH v3] staging: rtl8723bs: fix CamelCase warning for READ_MACREG

From: Greg KH

Date: Tue Mar 31 2026 - 04:46:41 EST


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@xxxxxxxxx>
> ---
> 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