Re: [PATCH] staging: rtl8723bs: place constant on right side of equality operator

From: Prithvi

Date: Mon Mar 23 2026 - 09:33:16 EST


On Mon, Mar 23, 2026 at 11:19:40AM +0200, Andy Shevchenko wrote:
> On Sat, Mar 21, 2026 at 02:55:36PM +0530, Prithvi Tambewagh wrote:
> > Place constant 0xFF on right side of equality operator when checking
> > value of hw_channel_plan to fix checkpatch.pl warning and conform with
> > the Linux Kernel coding style.
>
> First of all, in the very same function there are more of a such.
> And hence the Q: have you checked the entire driver? Please do.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Hello Andy,

Thanks for the correction...While checking out other places requiring similar
change, I observed the other place in the function where constant is on left
side of equality operator:

if (
(false == pHalData->bDisableSWChannelPlan) &&
rtw_is_channel_plan_valid(sw_channel_plan)
)
chnlPlan = sw_channel_plan;

Here, the formatting of if statement can be improved and we can also replace
(false == pHalData->bDisableSWChannelPlan) with :

!pHalData->bDisableSWChannelPlan

Would it be alright to add these changes to v2 of this patch itself since they
are related to the code having constant on left side of == operator?

Thanks,
Prithvi