Re: [PATCH] staging: r8188eu: remove unnecessary braces in if statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 18, 2022 at 01:37:05AM -0300, Marcelo Aloisio da Silva wrote:
> Braces are not necessary for single statement blocks.
> 
> Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@xxxxxxx>
> ---
>  drivers/staging/r8188eu/core/rtw_mlme.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
> index 45eff3018d73..ad1d73a27548 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme.c
> @@ -1379,10 +1379,8 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
>  	if (pregistrypriv->wifi_spec == 1) {
>  		struct wifidirect_info *pwdinfo = &adapter->wdinfo;
>  		if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
> -		{
>  			/* auto site survey */
>  			rtw_auto_scan_handler(adapter);
> -		}

Generally we prefer if statements around multi-line indents.  It helps
for readability.  But you could move them to the right place in a
different patch.

 		if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
 			/* auto site survey */
 			rtw_auto_scan_handler(adapter);
		}

The rest of the patch is fine.

regards,
dan carpenter





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux