[PATCH v4 15/16] staging: rtl8723bs: merge nested if conditions for clarity and tab problems

Vivek BalachandharTN posted 16 patches 4 months, 1 week ago
[PATCH v4 15/16] staging: rtl8723bs: merge nested if conditions for clarity and tab problems
Posted by Vivek BalachandharTN 4 months, 1 week ago
Combine nested if conditions for clarity and fix tab indentation in one
place to match kernel coding style.

No functional changes.

Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index aa842905a467..f17b16fe8819 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1254,8 +1254,8 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 						rtw_free_stainfo(adapter,  pcur_sta);
 
 					ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.mac_address);
-					if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
-					    if (ptarget_wlan)
+					if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true &&
+					    ptarget_wlan) {
 						ptarget_wlan->fixed = true;
 					}
 				}
-- 
2.39.5
Re: [PATCH v4 15/16] staging: rtl8723bs: merge nested if conditions for clarity and tab problems
Posted by Dan Carpenter 4 months, 1 week ago
On Thu, Oct 02, 2025 at 05:23:03PM +0000, Vivek BalachandharTN wrote:
> Combine nested if conditions for clarity and fix tab indentation in one
> place to match kernel coding style.
> 
> No functional changes.
> 
> Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index aa842905a467..f17b16fe8819 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -1254,8 +1254,8 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
>  						rtw_free_stainfo(adapter,  pcur_sta);
>  
>  					ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.mac_address);
> -					if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
> -					    if (ptarget_wlan)
> +					if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true &&
> +					    ptarget_wlan) {
>  						ptarget_wlan->fixed = true;
>  					}

Delete the curly braces as well.

regards,
dan carpenter
Re: [PATCH v4 15/16] staging: rtl8723bs: merge nested if conditions for clarity and tab problems
Posted by Vivek BalachandharTN 4 months ago
Ack. I will do the changes after the merge window. Thanks for the 
review, Dan.

Best,

Vivek

On 2025-10-03 3:10 a.m., Dan Carpenter wrote:
> On Thu, Oct 02, 2025 at 05:23:03PM +0000, Vivek BalachandharTN wrote:
>> Combine nested if conditions for clarity and fix tab indentation in one
>> place to match kernel coding style.
>>
>> No functional changes.
>>
>> Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
>> ---
>>   drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
>> index aa842905a467..f17b16fe8819 100644
>> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
>> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
>> @@ -1254,8 +1254,8 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
>>   						rtw_free_stainfo(adapter,  pcur_sta);
>>   
>>   					ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.mac_address);
>> -					if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
>> -					    if (ptarget_wlan)
>> +					if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true &&
>> +					    ptarget_wlan) {
>>   						ptarget_wlan->fixed = true;
>>   					}
> Delete the curly braces as well.
>
> regards,
> dan carpenter
>