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: <3799b30191f457cfec945ccc0b91bccf6dd7c63c.camel@perches.com>
Date:   Wed, 05 Dec 2018 09:37:11 -0800
From:   Joe Perches <joe@...ches.com>
To:     Michael Straube <straube.linux@...il.com>,
        gregkh@...uxfoundation.org
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/12] staging: rtl8188eu: correct indentation in
 update_wireless_mode()

On Wed, 2018-12-05 at 18:02 +0100, Michael Straube wrote:
> Correct indentation in update_wireless_mode() to clear a checkpatch
> warning. WARNING: Statements should start on a tabstop
[]
> diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
[]
> @@ -1442,7 +1442,7 @@ void update_wireless_mode(struct adapter *padapter)
>  
>  	if (pmlmeext->cur_wireless_mode & WIRELESS_11B)
>  		update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB);
> -	 else
> +	else
>  		update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
>  }
.
gcc generally emits smaller code by using a single
call and a ternary.

$ size drivers/staging/rtl8188eu/core/rtw_wlan_util.o*
   text	   data	    bss	    dec	    hex	filename
  14974	     36	      0	  15010	   3aa2	drivers/staging/rtl8188eu/core/rtw_wlan_util.o.new
  14990	     36	      0	  15026	   3ab2	drivers/staging/rtl8188eu/core/rtw_wlan_util.o.old
---
 drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
index 24918223499b..acad30f53f5d 100644
--- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
@@ -1440,10 +1440,9 @@ void update_wireless_mode(struct adapter *padapter)
 
 	rtw_hal_set_hwreg(padapter, HW_VAR_RESP_SIFS,  (u8 *)&SIFS_Timer);
 
-	if (pmlmeext->cur_wireless_mode & WIRELESS_11B)
-		update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB);
-	 else
-		update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
+	update_mgnt_tx_rate(padapter,
+			    pmlmeext->cur_wireless_mode & WIRELESS_11B ?
+			    IEEE80211_CCK_RATE_1MB : IEEE80211_OFDM_RATE_6MB);
 }
 
 void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ