lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59c70b2c-5dd5-4b57-9b74-9ae3c7401f0b@gmail.com>
Date: Fri, 5 Sep 2025 02:25:17 -0400
From: Vivek BalachandharTN <vivek.balachandhar@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 12/16] staging: rtl8723bs: remove unnecessary braces
 for single statement blocks

Will fix this. Thanks for pointing this, Dan.

Best,

Vivek

On 2025-09-04 3:42 a.m., Dan Carpenter wrote:
> On Thu, Sep 04, 2025 at 02:14:44AM +0000, Vivek BalachandharTN wrote:
>> Drop braces around conditional blocks that contain only a single
>> statement, as required by kernel coding style. This enhances clarity
>> and reduces visual clutter.
>>
>> No functional changes.
>>
>> Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@...il.com>
>> ---
>>   drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
>> index ef9057456768..27be46c11b65 100644
>> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
>> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
>> @@ -514,9 +514,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
>>   			break;
>>   		}
>>   
>> -		if (rtw_roam_flags(adapter)) {
>> +		if (rtw_roam_flags(adapter))
>>   			/* TODO: don't select network in the same ess as oldest if it's new enough*/
>> -		}
> Heh.  No.
>
>>   
>>   		if (!oldest || time_after(oldest->last_scanned, pnetwork->last_scanned))
>>   			oldest = pnetwork;
>> @@ -2546,9 +2545,8 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
>>   	len = 0;
>>   	p = rtw_get_ie(pie + sizeof(struct ndis_802_11_fix_ie), WLAN_EID_HT_OPERATION, &len,
>>   		       ie_len - sizeof(struct ndis_802_11_fix_ie));
>> -	if (p && len > 0) {
>> +	if (p && len > 0)
>>   		/* todo: */
>> -	}
> Also no.  Also heh.  You've introduced a bug.  Smatch does find this
> sort of bug btw.
>
> $ ~/smatch/released/smatch_scripts/kchecker --spammy drivers/staging/rtl8723bs/core/rtw_mlme.c
>    SYNC    include/config/auto.conf
>    HOSTCC  scripts/basic/fixdep
>    HOSTCC  scripts/basic/fixdep
>    CHECK   scripts/mod/empty.c
>    CALL    scripts/checksyscalls.sh
>    DESCEND objtool
>    INSTALL libsubcmd_headers
>    CC [M]  drivers/staging/rtl8723bs/core/rtw_mlme.o
>    CHECK   drivers/staging/rtl8723bs/core/rtw_mlme.c
> drivers/staging/rtl8723bs/core/rtw_mlme.c:843 find_network() error: we previously assumed 'pwlan' could be null (see line 838)
> drivers/staging/rtl8723bs/core/rtw_mlme.c:2413 rtw_restructure_ht_ie() warn: odd binop '0x1c & 0x0'
> drivers/staging/rtl8723bs/core/rtw_mlme.c:2467 rtw_update_ht_cap() warn: if statement not indented
> $
>
> It's always a good idea to add a kchecker to your QC process.
>
> regards,
> dan carpenter
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ