Re: [PATCH v2] staging: rtl8723bs: remove unnecessary parentheses

From: Dan Carpenter

Date: Mon Jun 01 2026 - 07:29:15 EST


On Sun, May 31, 2026 at 02:10:22PM +0800, Eugene Mavick wrote:
> Remove unnecessary parentheses to clear checkpatch.pl warnings
>
> Example of fixed warnings:
> CHECK: Unnecessary parentheses around dvobj->cam_cache[id]
> CHECK: Unnecessary parentheses around 'val != 0xfe'
>
> Checkpatch warnings regarding line length above 100 columns on modified
> lines were also fixed
>
> Signed-off-by: Eugene Mavick <mavick4022@xxxxxxxxx>
> ---
> V1->V2:
> Fixed following checkpatch warnings on modified lines:
> CHECK: Alignment should match open parenthesis(line 1114, 1249)
> CHECK: Logical continuations should be on the previous line(line 1251)
>
> v1: https://lore.kernel.org/all/20260530031621.443015-1-mavick4022@xxxxxxxxx/
>
> .../staging/rtl8723bs/core/rtw_wlan_util.c | 93 ++++++++++---------
> 1 file changed, 49 insertions(+), 44 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> index 1d37c2d5b10d..84e9772a39c2 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> @@ -118,7 +118,7 @@ int is_basicrate(struct adapter *padapter, unsigned char rate)
> for (i = 0; i < NumRates; i++) {
> val = pmlmeext->basicrate[i];
>
> - if ((val != 0xff) && (val != 0xfe))
> + if (val != 0xff && val != 0xfe)

Just leave this one as-is. (staging rules). We deliberately silenced
this checkpatch warning so it's weird for checkpatch to complain.
Same for the other conditions.

> if (rate == ratetbl_val_2wifirate(val))
> return true;
> }
> @@ -351,7 +351,7 @@ int is_client_associated_to_ap(struct adapter *padapter)
> return _FAIL;
>
> pmlmeext = &padapter->mlmeextpriv;
> - pmlmeinfo = &(pmlmeext->mlmext_info);
> + pmlmeinfo = &pmlmeext->mlmext_info;

These changes are fine though. Can you resend without the condtion
changes?

regards,
dan carpenter