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) _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel