Re: [PATCH v3] staging: rtl8723bs: remove GEN_CMD_CODE macro and callback array
From: Greg KH
Date: Sun Apr 26 2026 - 23:58:30 EST
On Thu, Apr 02, 2026 at 08:51:58PM -0400, Xiyuan Guo wrote:
> The GEN_CMD_CODE macro and the rtw_cmd_callback function pointer array
> add unnecessary layers of indirection and make the code difficult to
> follow. Remove the GEN_CMD_CODE macro and replace the function pointer
> array dispatcher in rtw_cmd_thread() with a direct switch statement.
>
> Additionally, rename the associated command enums from CamelCase to
> UPPERCASE_SNAKE_CASE to comply with the standard Linux kernel coding
> style.
>
> Signed-off-by: Xiyuan Guo <tommyguo039@xxxxxxxxx>
I like the idea, but this worries me as now you just dropped a bunch of
"unused" entries that kind of documented things. Have you tested this
change on a device this driver controls to verify it still works?
thanks,
greg k-h