Re: [PATCH 6/9] staging: rtl8723bs: fix Yoda conditions and == false comparisons

From: Andy Shevchenko

Date: Tue Apr 14 2026 - 08:22:11 EST


On Tue, Apr 14, 2026 at 12:58:30PM +0300, Marc Finkelbaum wrote:
> Replace reversed comparisons with natural-order equivalents:
> - '0xFF == hw_channel_plan' -> 'hw_channel_plan == 0xFF'
> - 'false == pHalData->bDisableSWChannelPlan' -> '!pHalData->...'
> - 'is_supported_24g(...) == false' -> '!is_supported_24g(...)'
>
> The multi-line if condition around bDisableSWChannelPlan is also
> reformatted to standard kernel one-line style.
>
> No functional change.

...

> - if (
> - (false == pHalData->bDisableSWChannelPlan) &&
> - rtw_is_channel_plan_valid(sw_channel_plan)
> - )
> + if ((!pHalData->bDisableSWChannelPlan) &&

Too many parentheses.

> + rtw_is_channel_plan_valid(sw_channel_plan))
> chnlPlan = sw_channel_plan;

--
With Best Regards,
Andy Shevchenko