* [PATCH] staging: rtl8723bs: place constant on right side of equality operator
@ 2026-03-21 9:25 Prithvi Tambewagh
2026-03-23 9:19 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Prithvi Tambewagh @ 2026-03-21 9:25 UTC (permalink / raw)
To: gregkh, straube.linux, ethantidmore06, dan.carpenter,
andriy.shevchenko
Cc: linux-staging, linux-kernel, linux-kernel-mentees, skhan,
david.hunter.linux, khalid, Prithvi Tambewagh
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.
Signed-off-by: Prithvi Tambewagh <activprithvi@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 31b3e880ae6a..597ba3d283c1 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -107,7 +107,7 @@ u8 hal_com_config_channel_plan(
pHalData->bDisableSWChannelPlan = false;
chnlPlan = def_channel_plan;
- if (0xFF == hw_channel_plan)
+ if (hw_channel_plan == 0xFF)
AutoLoadFail = true;
if (!AutoLoadFail) {
base-commit: 42bddab0563fe67882b2722620a66dd98c8dbf33
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8723bs: place constant on right side of equality operator
2026-03-21 9:25 [PATCH] staging: rtl8723bs: place constant on right side of equality operator Prithvi Tambewagh
@ 2026-03-23 9:19 ` Andy Shevchenko
2026-03-23 13:22 ` Prithvi
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2026-03-23 9:19 UTC (permalink / raw)
To: Prithvi Tambewagh
Cc: gregkh, straube.linux, ethantidmore06, dan.carpenter,
linux-staging, linux-kernel, linux-kernel-mentees, skhan,
david.hunter.linux, khalid
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8723bs: place constant on right side of equality operator
2026-03-23 9:19 ` Andy Shevchenko
@ 2026-03-23 13:22 ` Prithvi
2026-03-23 13:33 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Prithvi @ 2026-03-23 13:22 UTC (permalink / raw)
To: Andy Shevchenko
Cc: gregkh, straube.linux, ethantidmore06, dan.carpenter,
linux-staging, linux-kernel, linux-kernel-mentees, skhan,
david.hunter.linux, khalid
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8723bs: place constant on right side of equality operator
2026-03-23 13:22 ` Prithvi
@ 2026-03-23 13:33 ` Andy Shevchenko
2026-03-23 14:52 ` Prithvi
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2026-03-23 13:33 UTC (permalink / raw)
To: Prithvi
Cc: gregkh, straube.linux, ethantidmore06, dan.carpenter,
linux-staging, linux-kernel, linux-kernel-mentees, skhan,
david.hunter.linux, khalid
On Mon, Mar 23, 2026 at 06:52:35PM +0530, Prithvi wrote:
> 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.
> 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?
Yes, but I also meant to go through more files in this driver for the same
style issue.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8723bs: place constant on right side of equality operator
2026-03-23 13:33 ` Andy Shevchenko
@ 2026-03-23 14:52 ` Prithvi
0 siblings, 0 replies; 5+ messages in thread
From: Prithvi @ 2026-03-23 14:52 UTC (permalink / raw)
To: Andy Shevchenko
Cc: gregkh, straube.linux, ethantidmore06, dan.carpenter,
linux-staging, linux-kernel, linux-kernel-mentees, skhan,
david.hunter.linux, khalid
On Mon, Mar 23, 2026 at 03:33:50PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 23, 2026 at 06:52:35PM +0530, Prithvi wrote:
> > 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.
>
> > 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?
>
> Yes, but I also meant to go through more files in this driver for the same
> style issue.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Sure...sorry didn't get it earlier. I will check for checkpatch warnings
related to constant being on left side of test in the driver and send a
v2 patch.
Best Regards,
Prithvi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-23 14:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-21 9:25 [PATCH] staging: rtl8723bs: place constant on right side of equality operator Prithvi Tambewagh
2026-03-23 9:19 ` Andy Shevchenko
2026-03-23 13:22 ` Prithvi
2026-03-23 13:33 ` Andy Shevchenko
2026-03-23 14:52 ` Prithvi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox