Re: [PATCH v2 4/4] staging: rtl8723bs: Enclose CHAN_ARG macro body in parentheses

From: Greg KH

Date: Mon May 11 2026 - 04:12:59 EST


On Sun, May 10, 2026 at 01:52:07PM -0400, Pramod Maurya wrote:
> Wrap the macro expansion in outer parentheses to prevent operator
> precedence issues when the macro is used in expressions.
>
> Signed-off-by: Pramod Maurya <pramod.nexgen@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/include/ieee80211.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
> index beee37041eeb..d1167d9ea846 100644
> --- a/drivers/staging/rtl8723bs/include/ieee80211.h
> +++ b/drivers/staging/rtl8723bs/include/ieee80211.h
> @@ -639,7 +639,7 @@ struct rtw_ieee80211_channel {
> /*"orig_mpwr:%d\n"*/
>
> #define CHAN_ARG(channel) \
> - /*(channel)->band*/ \
> + (/*(channel)->band*/ \
> /*, (channel)->center_freq*/ \
> (channel)->hw_value \
> , (channel)->flags \
> @@ -649,7 +649,7 @@ struct rtw_ieee80211_channel {
> /*, (channel)->beacon_found*/ \
> /*, (channel)->orig_flags*/ \
> /*, (channel)->orig_mag*/ \
> - /*, (channel)->orig_mpwr*/ \
> + /*, (channel)->orig_mpwr*/)

These are comments? That macro is crazy, why not fix it up properly?

And what precedence issue is being fixed here?

thanks,

greg k-h