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] [day] [month] [year] [list]
Message-ID: <88798f9d-b765-421a-93bc-5e5b76995853@gmail.com>
Date: Fri, 23 Jan 2026 19:07:10 +0530
From: Khushal Chitturi <khushalchitturi@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: gregkh@...uxfoundation.org, hansg@...nel.org, straube.linux@...il.com,
 linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] staging: rtl8723bs: simplify boolean expressions

On 1/18/26 5:29 PM, Dan Carpenter wrote:
> On Thu, Jan 15, 2026 at 03:59:08PM +0530, Khushal Chitturi wrote:
>> Simplify boolean expressions in rtw_xmit.c to
>> comply with the kernel coding style
>>
>> Signed-off-by: Khushal Chitturi <khushalchitturi@...il.com>
>> ---
>>   drivers/staging/rtl8723bs/core/rtw_xmit.c | 38 ++++++++++++-----------
>>   1 file changed, 20 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
>> index bbc42db1c828..97e38ef62ac4 100644
>> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
>> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
>> @@ -384,7 +384,8 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
>>   	} else {
>>   		while (true) {
>>   			/* IOT action */
>> -			if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en == true) &&
>> +			if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) &&
>> +			    (pattrib->ampdu_en) &&
> 
> What are these parens for?
> 
>>   			    (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) {
>>   				pattrib->vcs_mode = CTS_TO_SELF;
>>   				break;
>> @@ -420,7 +421,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
>>   			/* to do list: check MIMO power save condition. */
>>   
>>   			/* check AMPDU aggregation for TXOP */
>> -			if (pattrib->ampdu_en == true) {
>> +			if (pattrib->ampdu_en) {
>>   				pattrib->vcs_mode = RTS_CTS;
>>   				break;
>>   			}
>> @@ -482,10 +483,10 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p
>>   	memset(pattrib->dot11tkiptxmickey.skey,  0, 16);
>>   	pattrib->mac_id = psta->mac_id;
>>   
>> -	if (psta->ieee8021x_blocked == true) {
>> +	if (psta->ieee8021x_blocked) {
>>   		pattrib->encrypt = 0;
>>   
>> -		if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)) {
>> +		if ((pattrib->ether_type != 0x888e) && (!check_fwstate(pmlmepriv, WIFI_MP_STATE))) {
> 
> These parens?
> 
>>   			res = _FAIL;
>>   			goto exit;
>>   		}
>> @@ -639,8 +640,8 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
>>   	memcpy(pattrib->dst, &etherhdr.h_dest, ETH_ALEN);
>>   	memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN);
>>   
>> -	if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
>> -		(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
>> +	if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) ||
>> +	    (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) {
> 
> These etc?

Yes these are unnecessary, I've removed the redundant parentheses in v4.
Please check the updated series.

-- 
Regards,
Khushal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ