Re: [PATCH] staging: rtl8723bs: remove braces around single statements

Julia Lawall <[email protected]>
Newsgroups dev.linux.lists.outreachy,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

On Tue, 25 Mar 2025, Abraham Samuel Adekunle wrote:

> The code contains braces around single statements in the if blocks
> which are unnecessary according to the Linux kernel coding style.
>
> Remove the braces to improve readability and maintain consistency.
>
> Reported by checkpatch:
>
> WARNING: braces {} are not necessary for single statement blocks
>
> Signed-off-by: Abraham Samuel Adekunle <[email protected]>
> ---
>  drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> index c60e179bb2e1..b17b295e8d3c 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
> @@ -56,9 +56,9 @@ int _ips_leave(struct adapter *padapter)
>  		pwrpriv->ips_leave_cnts++;
>
>  		result = rtw_ips_pwr_up(padapter);
> -		if (result == _SUCCESS) {
> +		if (result == _SUCCESS)
>  			pwrpriv->rf_pwrstate = rf_on;
> -		}
> +

I'm not sure you need to add a blank line here?

julia

>  		pwrpriv->bips_processing = false;
>
>  		pwrpriv->bkeepfwalive = false;
> @@ -549,9 +549,8 @@ void LeaveAllPowerSaveMode(struct adapter *Adapter)
>
>  		LPS_Leave_check(Adapter);
>  	} else {
> -		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off) {
> +		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off)
>  			ips_leave(Adapter);
> -		}
>  	}
>  }
>
> --
> 2.34.1
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.