staging: rtl8188eu: cleanup inconsistent indenting
PATCH 2/19 staging: rtl8188eu: rename odm_HWConfig
In reply to Michael StraubeRename source and header file to avoid CamelCase.odm_HWConfig.c -> odm_hwconfig.codm_HWConfig.h -> odm_hwconfig.h
---
drivers/staging/rtl8188eu/Makefile | 2 +-
.../staging/rtl8188eu/hal/{odm_HWConfig.c => odm_hwconfig.c} | 0
.../rtl8188eu/include/{odm_HWConfig.h => odm_hwconfig.h} | 0
drivers/staging/rtl8188eu/include/odm_precomp.h | 2 +-
4 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/staging/rtl8188eu/hal/{odm_HWConfig.c => odm_hwconfig.c} (100%)
rename drivers/staging/rtl8188eu/include/{odm_HWConfig.h => odm_hwconfig.h} (100%)drivers/staging/rtl8188eu/Makefile +1 -1
@@ -28,7 +28,7 @@ r8188eu-y := \ hal/hal_intf.o \ hal/hal_com.o \ hal/odm.o \ - hal/odm_HWConfig.o \ + hal/odm_hwconfig.o \ hal/odm_rtl8188e.o \ hal/rtl8188e_cmd.o \ hal/rtl8188e_dm.o \
drivers/staging/rtl8188eu/hal/odm_hwconfig.c renamed from drivers/staging/rtl8188eu/hal/odm_HWConfig.c +0 -0
drivers/staging/rtl8188eu/include/odm_hwconfig.h renamed from drivers/staging/rtl8188eu/include/odm_HWConfig.h +0 -0
drivers/staging/rtl8188eu/include/odm_precomp.h +1 -1
@@ -22,7 +22,7 @@/* 2 OutSrc Header Files */ #include "odm.h" -#include "odm_HWConfig.h" +#include "odm_hwconfig.h" #include "odm_debug.h" #include "../../rtlwifi/phydm/phydm_regdefine11n.h"
Signature · 1 line
2.19.0
PATCH 1/19 staging: rtl8188eu: cleanup inconsistent indenting
Cleanup all inconsistent indenting reported by smatch.
--- drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +- .../staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8188eu/core/rtw_led.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_mlme.c | 16 +++++++-------- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/core/rtw_security.c | 5 ++--- .../rtl8188eu/hal/hal8188e_rate_adaptive.c | 18 +++++++++-------- drivers/staging/rtl8188eu/hal/odm_HWConfig.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 20 +++++++++---------- .../staging/rtl8188eu/os_dep/ioctl_linux.c | 10 +++++----- drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 2 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +- 12 files changed, 43 insertions(+), 42 deletions(-)
drivers/staging/rtl8188eu/core/rtw_efuse.c +1 -1
@@ -37,7 +37,7 @@ void efuse_power_switch(struct adapter *pAdapter, u8 write, u8 pwrstate) tmpv16 =usb_read16 (pAdapter,REG_SYS_ISO_CTRL );if (!(tmpv16 &PWC_EV12V )) { tmpv16 |=PWC_EV12V ; -usb_write16 (pAdapter,REG_SYS_ISO_CTRL , tmpv16); +usb_write16 (pAdapter,REG_SYS_ISO_CTRL , tmpv16); }/* Reset: 0x0000h[28], default valid */ tmpv16 =usb_read16 (pAdapter,REG_SYS_FUNC_EN );
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +1 -1
@@ -246,7 +246,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) wireless_mode = pregistrypriv->wireless_mode; } -rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode); +rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode); rateLen =rtw_get_rateset_len (pdev_network->SupportedRates);
drivers/staging/rtl8188eu/core/rtw_led.c +2 -2
@@ -357,7 +357,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct }if (pLed->bLedLinkBlinkInProgress) {del_timer_sync (&pLed->BlinkTimer); - pLed->bLedLinkBlinkInProgress = false; + pLed->bLedLinkBlinkInProgress = false; }if (pLed->bLedBlinkInProgress) {del_timer_sync (&pLed->BlinkTimer);
@@ -383,7 +383,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct }if (pLed->bLedLinkBlinkInProgress) {del_timer_sync (&pLed->BlinkTimer); - pLed->bLedLinkBlinkInProgress = false; + pLed->bLedLinkBlinkInProgress = false; }if (pLed->bLedBlinkInProgress) {del_timer_sync (&pLed->BlinkTimer);
drivers/staging/rtl8188eu/core/rtw_mlme.c +8 -8
@@ -305,7 +305,7 @@ static int is_same_ess(struct wlan_bssid_ex *a, struct wlan_bssid_ex *b)int is_same_network (struct wlan_bssid_ex *src,struct wlan_bssid_ex *dst) { -u16 s_cap, d_cap; +u16 s_cap, d_cap;__le16 le_scap, le_dcap;memcpy ((u8 *)&le_scap,rtw_get_capability_from_ie (src->ies),2 );
@@ -842,7 +842,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, strif (psta) {/* update ptarget_sta */ DBG_88E ("%s\n" , __func__); psta->aid = pnetwork->join_res; - psta->mac_id =0 ; + psta->mac_id =0 ;/* sta mode */ rtw_hal_set_odm_var (padapter,HAL_ODM_STA_INFO , psta, true);/* security related */
@@ -1038,12 +1038,12 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) }/* s4. indicate connect */ -if (check_fwstate (pmlmepriv,WIFI_STATION_STATE ) == true) { -rtw_indicate_connect (adapter); - }else { -/* adhoc mode will rtw_indicate_connect when rtw_stassoc_event_callback */ -RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("adhoc mode, fw_state:%x" ,get_fwstate (pmlmepriv))); - } +if (check_fwstate (pmlmepriv,WIFI_STATION_STATE ) == true) { +rtw_indicate_connect (adapter); + }else { +/* adhoc mode will rtw_indicate_connect when rtw_stassoc_event_callback */ +RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("adhoc mode, fw_state:%x" ,get_fwstate (pmlmepriv))); + }/* s5. Cancel assoc_timer */ del_timer_sync (&pmlmepriv->assoc_timer);
drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
@@ -488,7 +488,7 @@ static struct recv_frame *portctrl(struct adapter *adapter, prtnframe = precv_frame; } -return prtnframe; +return prtnframe; } static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
drivers/staging/rtl8188eu/core/rtw_security.c +2 -3
@@ -353,7 +353,7 @@ void rtw_seccalctkipmic(u8 *key, u8 *header, u8 *data, u32 data_len, u8 *mic_cod/* Michael MIC pseudo header: DA, SA, 3 x 0, Priority */ if (header[1 ]&1 ) {/* ToDS == 1 */ -rtw_secmicappend (&micdata, &header[16 ],6 );/* DA */ +rtw_secmicappend (&micdata, &header[16 ],6 );/* DA */ if (header[1 ]&2 )/* From Ds == 1 */ rtw_secmicappend (&micdata, &header[24 ],6 );else
@@ -1273,8 +1273,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) } } - -return res; +return res; }u32 rtw_aes_decrypt (struct adapter *padapter,u8 *precvframe)
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c +10 -8
@@ -418,14 +418,16 @@ static int odm_ARFBRefresh_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_inf }else { pRaInfo->LowestRate =0 ; } -if (pRaInfo->HighestRate >0x13 ) - pRaInfo->PTModeSS =3 ; -else if (pRaInfo->HighestRate >0x0b ) - pRaInfo->PTModeSS =2 ; -else if (pRaInfo->HighestRate >0x0b ) - pRaInfo->PTModeSS =1 ; -else - pRaInfo->PTModeSS =0 ; + +if (pRaInfo->HighestRate >0x13 ) + pRaInfo->PTModeSS =3 ; +else if (pRaInfo->HighestRate >0x0b ) + pRaInfo->PTModeSS =2 ; +else if (pRaInfo->HighestRate >0x0b ) + pRaInfo->PTModeSS =1 ; +else + pRaInfo->PTModeSS =0 ; +ODM_RT_TRACE (dm_odm,ODM_COMP_RATE_ADAPTIVE ,ODM_DBG_LOUD , ("ODM_ARFBRefresh_8188E(): PTModeSS =%d\n" , pRaInfo->PTModeSS));
drivers/staging/rtl8188eu/hal/odm_HWConfig.c +1 -1
@@ -185,7 +185,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,/* (1)Get RSSI for HT rate */ -for (i =RF_PATH_A ; i <RF_PATH_MAX ; i++) { +for (i =RF_PATH_A ; i <RF_PATH_MAX ; i++) {/* 2008/01/30 MH we will judge RF RX path now. */ if (dm_odm->RFPathRxEnable &BIT (i)) rf_rx_num++;
drivers/staging/rtl8188eu/hal/usb_halinit.c +10 -10
@@ -785,13 +785,13 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) haldata->RfRegChnlVal[0 ] =rtw_hal_read_rfreg (Adapter, (enum rf_radio_path )0 ,RF_CHNLBW , bRFRegOffsetMask); haldata->RfRegChnlVal[1 ] =rtw_hal_read_rfreg (Adapter, (enum rf_radio_path )1 ,RF_CHNLBW , bRFRegOffsetMask); -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_TURN_ON_BLOCK ); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_TURN_ON_BLOCK );_BBTurnOnBlock (Adapter); -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_INIT_SECURITY ); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_INIT_SECURITY );invalidate_cam_all (Adapter); -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_MISC11 ); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_MISC11 );/* 2010/12/17 MH We need to set TX power according to EFUSE content at first. */ phy_set_tx_power_level (Adapter, haldata->CurrentChannel);
@@ -816,7 +816,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC11);/* Nav limit , suggest by scott */ usb_write8 (Adapter,0x652 ,0x0 ); -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_INIT_HAL_DM ); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_INIT_HAL_DM );rtl8188e_InitHalDm (Adapter);/* 2010/08/11 MH Merge from 8192SE for Minicard init. We need to confirm current radio status */
@@ -840,8 +840,8 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_HAL_DM);/* enable tx DMA to drop the redundate data of packet */ usb_write16 (Adapter,REG_TXDMA_OFFSET_CHK , (usb_read16 (Adapter,REG_TXDMA_OFFSET_CHK ) |DROP_DATA_EN )); -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_IQK ); -/* 2010/08/26 MH Merge from 8192CE. */ +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_IQK ); +/* 2010/08/26 MH Merge from 8192CE. */ if (pwrctrlpriv->rf_pwrstate == rf_on) {if (haldata->odmpriv.RFCalibrateInfo.bIQKInitialized) {rtl88eu_phy_iq_calibrate (Adapter, true);
@@ -850,12 +850,12 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_IQK); haldata->odmpriv.RFCalibrateInfo.bIQKInitialized = true; } -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_PW_TRACK ); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_PW_TRACK );ODM_TXPowerTrackingCheck (&haldata->odmpriv); -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_LCK ); -rtl88eu_phy_lc_calibrate (Adapter); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_LCK ); +rtl88eu_phy_lc_calibrate (Adapter); }/* HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PABIAS); */
@@ -866,7 +866,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK);usb_write32 (Adapter,REG_FWHW_TXQ_CTRL ,usb_read32 (Adapter,REG_FWHW_TXQ_CTRL ) |BIT (12 )); exit: -HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_END ); +HAL_INIT_PROFILE_TAG (HAL_INIT_STAGES_END );DBG_88E ("%s in %dms\n" , __func__,jiffies_to_msecs (jiffies - init_start_time));
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +5 -5
@@ -421,7 +421,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, ret = -EOPNOTSUPP ; goto exit; } -memcpy (&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0 ]), pwep->KeyMaterial, pwep->KeyLength); +memcpy (&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0 ]), pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength;rtw_set_key (padapter, psecuritypriv, wep_key_idx,0 ); }
@@ -1317,8 +1317,8 @@ static int rtw_wx_set_essid(struct net_device *dev,RT_TRACE (_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid =[%s]\n" , src_ssid));spin_lock_bh (&queue->lock); - phead =get_list_head (queue); - pmlmepriv->pscanned = phead->next; + phead =get_list_head (queue); + pmlmepriv->pscanned = phead->next;while (phead != pmlmepriv->pscanned) { pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
@@ -1400,7 +1400,7 @@ static int rtw_wx_set_rate(struct net_device *dev,u32 target_rate = wrqu->bitrate.value;u32 fixed = wrqu->bitrate.fixed;u32 ratevalue =0 ; -u8 mpdatarate[NumRates] = {11 ,10 ,9 ,8 ,7 ,6 ,5 ,4 ,3 ,2 ,1 ,0 ,0xff }; +u8 mpdatarate[NumRates] = {11 ,10 ,9 ,8 ,7 ,6 ,5 ,4 ,3 ,2 ,1 ,0 ,0xff };RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, (" rtw_wx_set_rate\n" ));RT_TRACE (_module_rtl871x_ioctl_os_c, _drv_info_, ("target_rate = %d, fixed = %d\n" , target_rate, fixed));
@@ -2278,7 +2278,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,/* don't update "psecuritypriv->dot11PrivacyAlgrthm" and */ /* psecuritypriv->dot11PrivacyKeyIndex = keyid", but can rtw_set_key to cam */ -memcpy (&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0 ]), pwep->KeyMaterial, pwep->KeyLength); +memcpy (&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0 ]), pwep->KeyMaterial, pwep->KeyLength); psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength;
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -1
@@ -78,7 +78,7 @@ void rtw_os_indicate_disconnect(struct adapter *adapter) {netif_carrier_off (adapter->pnetdev);/* Do it first for tx broadcast pkt after disconnection issue! */ rtw_indicate_wx_disassoc_event (adapter); -rtw_reset_securitypriv (adapter); +rtw_reset_securitypriv (adapter); }void rtw_report_sec_ie (struct adapter *adapter,u8 authmode,u8 *sec_ie)
drivers/staging/rtl8188eu/os_dep/os_intfs.c +1 -1
@@ -643,7 +643,7 @@ int ips_netdrv_open(struct adapter *padapter)mod_timer (&padapter->mlmepriv.dynamic_chk_timer, jiffies +msecs_to_jiffies (5000 )); -return _SUCCESS; +return _SUCCESS; netdev_open_error:DBG_88E ("-ips_netdrv_open - drv_open failure, bup =%d\n" , padapter->bup);
Signature · 1 line
2.19.0
PATCH 4/19 staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c
Add spaces around '+' in odm_hwconfig.c to follow kernel coding style. Reported by checkpatch.
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +3 -3
@@ -21,7 +21,7 @@ static u8 odm_QueryRxPwrPercentage(s8 AntPower)else if (AntPower >=0 )return 100 ;else -return 100 +AntPower; +return 100 + AntPower; }/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */
@@ -145,7 +145,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,PWDB_ALL =odm_QueryRxPwrPercentage (rx_pwr_all);if (!cck_highpwr) {if (PWDB_ALL >=80 ) -PWDB_ALL = ((PWDB_ALL -80 )<<1 )+((PWDB_ALL -80 )>>1 )+80 ; +PWDB_ALL = ((PWDB_ALL -80 )<<1 ) + ((PWDB_ALL -80 )>>1 ) +80 ;else if ((PWDB_ALL <=78 ) && (PWDB_ALL >=20 ))PWDB_ALL +=3 ;if (PWDB_ALL >100 )
@@ -377,7 +377,7 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm,if (pEntry->rssi_stat.ValidBit ==64 ) { Weighting =min_t (u32, OFDM_pkt <<4 ,64 ); - UndecoratedSmoothedPWDB = (Weighting*UndecoratedSmoothedOFDM+(64 -Weighting)*UndecoratedSmoothedCCK)>>6 ; + UndecoratedSmoothedPWDB = (Weighting*UndecoratedSmoothedOFDM + (64 -Weighting)*UndecoratedSmoothedCCK)>>6 ; }else {if (pEntry->rssi_stat.ValidBit !=0 ) UndecoratedSmoothedPWDB = (OFDM_pkt * UndecoratedSmoothedOFDM +
Signature · 1 line
2.19.0
PATCH 6/19 staging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c
In reply to Michael StraubeReplace tabs with spaces in odm_hwconfig.c where appropriate.
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +2 -2
@@ -17,9 +17,9 @@static u8 odm_QueryRxPwrPercentage (s8 AntPower) {if ((AntPower <=-100 ) || (AntPower >=20 )) -return 0 ; +return 0 ;else if (AntPower >=0 ) -return 100 ; +return 100 ;else return 100 + AntPower; }
Signature · 1 line
2.19.0
PATCH 8/19 staging: rtl8188eu: rename odm_QueryRxPwrPercentage()
In reply to Michael StraubeRename odm_QueryRxPwrPercentage() to avoid CamelCase. odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +4 -4
@@ -14,7 +14,7 @@#define READ_AND_CONFIG_MP (ic, txt) (ODM_ReadAndConfig##txt##ic(dm_odm))#define READ_AND_CONFIG_TC (ic, txt) (ODM_ReadAndConfig_TC##txt##ic(dm_odm)) -static u8 odm_QueryRxPwrPercentage (s8 antpower) +static u8 odm_query_rxpwrpercentage (s8 antpower) {if ((antpower <=-100 ) || (antpower >=20 ))return 0 ;
@@ -142,7 +142,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,break ; } rx_pwr_all +=6 ; -PWDB_ALL =odm_QueryRxPwrPercentage (rx_pwr_all); +PWDB_ALL =odm_query_rxpwrpercentage (rx_pwr_all);if (!cck_highpwr) {if (PWDB_ALL >=80 )PWDB_ALL = ((PWDB_ALL -80 )<<1 ) + ((PWDB_ALL -80 )>>1 ) +80 ;
@@ -190,7 +190,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm, pPhyInfo->RxPwr[i] = rx_pwr[i];/* Translate DBM to percentage. */ -RSSI =odm_QueryRxPwrPercentage (rx_pwr[i]); +RSSI =odm_query_rxpwrpercentage (rx_pwr[i]); total_rssi +=RSSI ;/* Modification for ext-LNA board */
@@ -213,7 +213,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,/* (2)PWDB, Average PWDB calculated by hardware (for rate adaptive) */ rx_pwr_all = (((pPhyStaRpt->cck_sig_qual_ofdm_pwdb_all) >>1 ) &0x7f ) -110 ; -PWDB_ALL =odm_QueryRxPwrPercentage (rx_pwr_all); +PWDB_ALL =odm_query_rxpwrpercentage (rx_pwr_all);PWDB_ALL_BT =PWDB_ALL ; pPhyInfo->RxPWDBAll =PWDB_ALL ;
Signature · 1 line
2.19.0
PATCH 10/19 staging: rtl8188eu: rename odm_EVMdbToPercentage()
In reply to Michael StraubeRename odm_EVMdbToPercentage() to avoid CamelCase. odm_EVMdbToPercentage -> odm_evm_db_to_percentage
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +2 -2
@@ -49,7 +49,7 @@ static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig)return RetSig; } -static u8 odm_EVMdbToPercentage (s8 value) +static u8 odm_evm_db_to_percentage (s8 value) {/* -33dB~0dB to 0%~99% */ s8 ret_val;
@@ -231,7 +231,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,/* Do not use shift operation like "rx_evmX >>= 1" because the compilor of free build environment */ /* fill most significant bit to "zero" when doing shifting operation which may change a negative */ /* value to positive one, then the dbm value (which is supposed to be negative) is not correct anymore. */ -EVM =odm_EVMdbToPercentage ((pPhyStaRpt->stream_rxevm[i]));/* dbm */ +EVM =odm_evm_db_to_percentage ((pPhyStaRpt->stream_rxevm[i]));/* dbm */ if (pPktinfo->bPacketMatchBSSID) {if (i ==RF_PATH_A )/* Fill value in RFD, Get the first spatial stream only */
Signature · 1 line
2.19.0
PATCH 11/19 staging: rtl8188eu: rename parameter of odm_SignalScaleMapping()
In reply to Michael StraubeRename parameter of odm_SignalScaleMapping() to avoid CamelCase. CurrSig -> currsig
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +16 -15
@@ -26,26 +26,27 @@ static u8 odm_query_rxpwrpercentage(s8 antpower)/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */ /* IF other SW team do not support the feature, remove this section.?? */ -static s32 odm_SignalScaleMapping (struct odm_dm_struct *dm_odm,s32 CurrSig) +static s32 odm_SignalScaleMapping (struct odm_dm_struct *dm_odm,s32 currsig) {s32 RetSig =0 ; -if (CurrSig >=51 && CurrSig <=100 ) +if (currsig >=51 && currsig <=100 ) RetSig =100 ; -else if (CurrSig >=41 && CurrSig <=50 ) - RetSig =80 + ((CurrSig -40 ) *2 ); -else if (CurrSig >=31 && CurrSig <=40 ) - RetSig =66 + (CurrSig -30 ); -else if (CurrSig >=21 && CurrSig <=30 ) - RetSig =54 + (CurrSig -20 ); -else if (CurrSig >=10 && CurrSig <=20 ) - RetSig =42 + (((CurrSig -10 ) *2 ) /3 ); -else if (CurrSig >=5 && CurrSig <=9 ) - RetSig =22 + (((CurrSig -5 ) *3 ) /2 ); -else if (CurrSig >=1 && CurrSig <=4 ) - RetSig =6 + (((CurrSig -1 ) *3 ) /2 ); +else if (currsig >=41 && currsig <=50 ) + RetSig =80 + ((currsig -40 ) *2 ); +else if (currsig >=31 && currsig <=40 ) + RetSig =66 + (currsig -30 ); +else if (currsig >=21 && currsig <=30 ) + RetSig =54 + (currsig -20 ); +else if (currsig >=10 && currsig <=20 ) + RetSig =42 + (((currsig -10 ) *2 ) /3 ); +else if (currsig >=5 && currsig <=9 ) + RetSig =22 + (((currsig -5 ) *3 ) /2 ); +else if (currsig >=1 && currsig <=4 ) + RetSig =6 + (((currsig -1 ) *3 ) /2 );else - RetSig = CurrSig; + RetSig = currsig; +return RetSig; }
Signature · 1 line
2.19.0
PATCH 14/19 staging: rtl8188eu: correct block comment in bb_cfg.c
In reply to Michael StraubeCorrect block comment to clear a checkpatch warning.
WARNING: Block comments should align the * on each line
--- drivers/staging/rtl8188eu/hal/bb_cfg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8188eu/hal/bb_cfg.c +4 -4
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /****************************************************************************** -* -* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -* -******************************************************************************/ +* +* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. +* +******************************************************************************/ #include "odm_precomp.h"
Signature · 1 line
2.19.0
PATCH 16/19 staging: rtl8188eu: add spaces around '+' in fw.c
In reply to Michael StraubeAdd spaces around '+' in fw.c to follow kernel coding style. Reported by checkpatch.
--- drivers/staging/rtl8188eu/hal/fw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/hal/fw.c +3 -3
@@ -98,9 +98,9 @@ static void rtl88e_firmware_selfreset(struct adapter *adapt) {u8 u1b_tmp; - u1b_tmp =usb_read8 (adapt,REG_SYS_FUNC_EN +1 ); -usb_write8 (adapt,REG_SYS_FUNC_EN +1 , (u1b_tmp & (~BIT (2 )))); -usb_write8 (adapt,REG_SYS_FUNC_EN +1 , (u1b_tmp |BIT (2 ))); + u1b_tmp =usb_read8 (adapt,REG_SYS_FUNC_EN +1 ); +usb_write8 (adapt,REG_SYS_FUNC_EN +1 , (u1b_tmp & (~BIT (2 )))); +usb_write8 (adapt,REG_SYS_FUNC_EN +1 , (u1b_tmp |BIT (2 ))); }static int _rtl88e_fw_free_to_go (struct adapter *adapt)
Signature · 1 line
2.19.0
PATCH 18/19 staging: rtl8188eu: remove braces from single if statement
In reply to Michael StraubeRemove braces from single line if statement.
Reported by checkpatch.
--- drivers/staging/rtl8188eu/hal/odm_rtl8188e.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c +1 -2
@@ -90,9 +90,8 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm)struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable;u32 AntCombination =2 ; -if (*dm_odm->mp_mode ==1 ) { +if (*dm_odm->mp_mode ==1 )return ; - }for (i =0 ; i <6 ; i++) { dm_fat_tbl->Bssid[i] =0 ;
Signature · 1 line
2.19.0
PATCH 19/19 staging: rtl8188eu: fix spelling mistake in comment
In reply to Michael StraubeFix a spelling mistake reported by checkpatch.
Caculate -> Calculate
--- drivers/staging/rtl8188eu/hal/odm_rtl8188e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c +1 -1
@@ -272,7 +272,7 @@ static void rtl88eu_dm_hw_ant_div(struct odm_dm_struct *dm_odm)for (i =0 ; i <ODM_ASSOCIATE_ENTRY_NUM ; i++) { entry = dm_odm->pODM_StaInfo[i];if (IS_STA_VALID (entry)) { -/* 2 Caculate RSSI per Antenna */ +/* 2 Calculate RSSI per Antenna */ main_rssi = (dm_fat_tbl->MainAnt_Cnt[i] !=0 ) ? (dm_fat_tbl->MainAnt_Sum[i]/dm_fat_tbl->MainAnt_Cnt[i]) :0 ; aux_rssi = (dm_fat_tbl->AuxAnt_Cnt[i] != 0) ?
Signature · 1 line
2.19.0
PATCH 17/19 staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c
In reply to Michael StraubeRemove unnecessary parentheses in odm_rtl8188e.c.
Reported by checkpatch.
--- drivers/staging/rtl8188eu/hal/odm_rtl8188e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/hal/odm_rtl8188e.c +3 -3
@@ -13,7 +13,7 @@ static void dm_rx_hw_antena_div_init(struct odm_dm_struct *dm_odm)struct adapter *adapter = dm_odm->Adapter;u32 value32; -if (*(dm_odm->mp_mode) ==1 ) { +if (*dm_odm->mp_mode ==1 ) { dm_odm->AntDivType =CGCS_RX_SW_ANTDIV ;phy_set_bb_reg (adapter,ODM_REG_IGI_A_11N ,BIT (7 ),0 );phy_set_bb_reg (adapter,ODM_REG_LNA_SWITCH_11N ,BIT (31 ),1 );
@@ -44,7 +44,7 @@ static void dm_trx_hw_antenna_div_init(struct odm_dm_struct *dm_odm)struct adapter *adapter = dm_odm->Adapter;u32 value32; -if (*(dm_odm->mp_mode) ==1 ) { +if (*dm_odm->mp_mode ==1 ) { dm_odm->AntDivType =CGCS_RX_SW_ANTDIV ;phy_set_bb_reg (adapter,ODM_REG_IGI_A_11N ,BIT (7 ),0 ); phy_set_bb_reg(adapter, ODM_REG_RX_ANT_CTRL_11N,
@@ -90,7 +90,7 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm)struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable;u32 AntCombination =2 ; -if (*(dm_odm->mp_mode) ==1 ) { +if (*dm_odm->mp_mode ==1 ) {return ; }
Signature · 1 line
2.19.0
PATCH 13/19 staging: rtl8188eu: rename odm_SignalScaleMapping()
In reply to Michael StraubeRename odm_SignalScaleMapping to avoid CamelCase. odm_SignalScaleMapping -> odm_signal_scale_mapping
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +3 -3
@@ -26,7 +26,7 @@ static u8 odm_query_rxpwrpercentage(s8 antpower)/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */ /* IF other SW team do not support the feature, remove this section.?? */ -static s32 odm_SignalScaleMapping (struct odm_dm_struct *dm_odm,s32 currsig) +static s32 odm_signal_scale_mapping (struct odm_dm_struct *dm_odm,s32 currsig) {s32 retsig =0 ;
@@ -244,10 +244,10 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,/* UI BSS List signal strength(in percentage), make it good looking, from 0~100. */ /* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */ if (isCCKrate) { - pPhyInfo->SignalStrength = (u8)(odm_SignalScaleMapping (dm_odm,PWDB_ALL ));/* PWDB_ALL; */ + pPhyInfo->SignalStrength = (u8)(odm_signal_scale_mapping (dm_odm,PWDB_ALL ));/* PWDB_ALL; */ }else {if (rf_rx_num !=0 ) - pPhyInfo->SignalStrength = (u8)(odm_SignalScaleMapping (dm_odm, total_rssi /= rf_rx_num)); + pPhyInfo->SignalStrength = (u8)(odm_signal_scale_mapping (dm_odm, total_rssi /= rf_rx_num)); }/* For 92C/92D HW (Hybrid) Antenna Diversity */
Signature · 1 line
2.19.0
PATCH 15/19 staging: rtl8188eu: simplify block comment in pwrseq.c
In reply to Michael StraubeSimplify block comment to a single line to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines
--- drivers/staging/rtl8188eu/hal/pwrseq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/hal/pwrseq.c +2 -3
@@ -8,9 +8,8 @@#include "pwrseq.h" #include <rtl8188e_hal.h> -/* -drivers should parse below arrays and do the corresponding actions -*/ +/* drivers should parse below arrays and do the corresponding actions */ +/* 3 Power on Array */ struct wl_pwr_cfg rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS +RTL8188E_TRANS_END_STEPS ] = {
Signature · 1 line
2.19.0
PATCH 12/19 staging: rtl8188eu: rename variable in odm_SignalScaleMapping()
In reply to Michael StraubeRename variable in odm_SignalScaleMapping() to avoid CamelCase. RetSig -> retsig
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +10 -10
@@ -28,26 +28,26 @@ static u8 odm_query_rxpwrpercentage(s8 antpower)/* IF other SW team do not support the feature, remove this section.?? */ static s32 odm_SignalScaleMapping (struct odm_dm_struct *dm_odm,s32 currsig) { -s32 RetSig =0 ; +s32 retsig =0 ;if (currsig >=51 && currsig <=100 ) - RetSig =100 ; + retsig =100 ;else if (currsig >=41 && currsig <=50 ) - RetSig =80 + ((currsig -40 ) *2 ); + retsig =80 + ((currsig -40 ) *2 );else if (currsig >=31 && currsig <=40 ) - RetSig =66 + (currsig -30 ); + retsig =66 + (currsig -30 );else if (currsig >=21 && currsig <=30 ) - RetSig =54 + (currsig -20 ); + retsig =54 + (currsig -20 );else if (currsig >=10 && currsig <=20 ) - RetSig =42 + (((currsig -10 ) *2 ) /3 ); + retsig =42 + (((currsig -10 ) *2 ) /3 );else if (currsig >=5 && currsig <=9 ) - RetSig =22 + (((currsig -5 ) *3 ) /2 ); + retsig =22 + (((currsig -5 ) *3 ) /2 );else if (currsig >=1 && currsig <=4 ) - RetSig =6 + (((currsig -1 ) *3 ) /2 ); + retsig =6 + (((currsig -1 ) *3 ) /2 );else - RetSig = currsig; + retsig = currsig; -return RetSig; +return retsig; }static u8 odm_evm_db_to_percentage (s8 value)
Signature · 1 line
2.19.0
PATCH 9/19 staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()
In reply to Michael StraubeRename parameter of odm_EVMdbToPercentage() to avoid CamelCase. Value -> value
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +2 -2
@@ -49,12 +49,12 @@ static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig)return RetSig; } -static u8 odm_EVMdbToPercentage (s8 Value) +static u8 odm_EVMdbToPercentage (s8 value) {/* -33dB~0dB to 0%~99% */ s8 ret_val; - ret_val = Value; + ret_val = value;if (ret_val >=0 ) ret_val =0 ;
Signature · 1 line
2.19.0
PATCH 7/19 staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()
In reply to Michael StraubeRename parameter of odm_QueryRxPwrPercentage() to avoid CamelCase. AntPower -> antpower
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +4 -4
@@ -14,14 +14,14 @@#define READ_AND_CONFIG_MP (ic, txt) (ODM_ReadAndConfig##txt##ic(dm_odm))#define READ_AND_CONFIG_TC (ic, txt) (ODM_ReadAndConfig_TC##txt##ic(dm_odm)) -static u8 odm_QueryRxPwrPercentage (s8 AntPower) +static u8 odm_QueryRxPwrPercentage (s8 antpower) { -if ((AntPower <=-100 ) || (AntPower >=20 )) +if ((antpower <=-100 ) || (antpower >=20 ))return 0 ; -else if (AntPower >=0 ) +else if (antpower >=0 )return 100 ;else -return 100 + AntPower; +return 100 + antpower; }/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */
Signature · 1 line
2.19.0
PATCH 5/19 staging: rtl8188eu: add spaces around '*' in odm_hwconfig.c
In reply to Michael StraubeAdd spaces around '*' in odm_hwconfig.c to follow kernel coding style. Reported by checkpatch.
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +14 -14
@@ -33,7 +33,7 @@ static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig)if (CurrSig >=51 && CurrSig <=100 ) RetSig =100 ;else if (CurrSig >=41 && CurrSig <=50 ) - RetSig =80 + ((CurrSig -40 )*2 ); + RetSig =80 + ((CurrSig -40 ) *2 );else if (CurrSig >=31 && CurrSig <=40 ) RetSig =66 + (CurrSig -30 );else if (CurrSig >=21 && CurrSig <=30 )
@@ -110,33 +110,33 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,switch (LNA_idx) {case 7 :if (VGA_idx <=27 ) - rx_pwr_all =-100 +2 *(27 -VGA_idx);/* VGA_idx = 27~2 */ + rx_pwr_all =-100 +2 * (27 -VGA_idx);/* VGA_idx = 27~2 */ else rx_pwr_all =-100 ;break ;case 6 : - rx_pwr_all =-48 +2 *(2 -VGA_idx);/* VGA_idx = 2~0 */ + rx_pwr_all =-48 +2 * (2 -VGA_idx);/* VGA_idx = 2~0 */ break ;case 5 : - rx_pwr_all =-42 +2 *(7 -VGA_idx);/* VGA_idx = 7~5 */ + rx_pwr_all =-42 +2 * (7 -VGA_idx);/* VGA_idx = 7~5 */ break ;case 4 : - rx_pwr_all =-36 +2 *(7 -VGA_idx);/* VGA_idx = 7~4 */ + rx_pwr_all =-36 +2 * (7 -VGA_idx);/* VGA_idx = 7~4 */ break ;case 3 : - rx_pwr_all =-24 +2 *(7 -VGA_idx);/* VGA_idx = 7~0 */ + rx_pwr_all =-24 +2 * (7 -VGA_idx);/* VGA_idx = 7~0 */ break ;case 2 :if (cck_highpwr) - rx_pwr_all =-12 +2 *(5 -VGA_idx);/* VGA_idx = 5~0 */ + rx_pwr_all =-12 +2 * (5 -VGA_idx);/* VGA_idx = 5~0 */ else - rx_pwr_all =-6 +2 *(5 -VGA_idx); + rx_pwr_all =-6 +2 * (5 -VGA_idx);break ;case 1 : - rx_pwr_all =8 -2 *VGA_idx; + rx_pwr_all =8 -2 * VGA_idx;break ;case 0 : - rx_pwr_all =14 -2 *VGA_idx; + rx_pwr_all =14 -2 * VGA_idx;break ;default :break ;
@@ -185,7 +185,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,if (dm_odm->RFPathRxEnable &BIT (i)) rf_rx_num++; - rx_pwr[i] = ((pPhyStaRpt->path_agc[i].gain &0x3F )*2 ) -110 ; + rx_pwr[i] = ((pPhyStaRpt->path_agc[i].gain &0x3F ) *2 ) -110 ; pPhyInfo->RxPwr[i] = rx_pwr[i];
@@ -334,12 +334,12 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm, }else {if (pPhyInfo->RxPWDBAll > (u32 )UndecoratedSmoothedOFDM) { UndecoratedSmoothedOFDM = - (((UndecoratedSmoothedOFDM)*(Rx_Smooth_Factor-1 )) + + (((UndecoratedSmoothedOFDM) * (Rx_Smooth_Factor-1 )) + (RSSI_Ave)) / (Rx_Smooth_Factor); UndecoratedSmoothedOFDM = UndecoratedSmoothedOFDM +1 ; }else { UndecoratedSmoothedOFDM = - (((UndecoratedSmoothedOFDM)*(Rx_Smooth_Factor-1 )) + + (((UndecoratedSmoothedOFDM) * (Rx_Smooth_Factor-1 )) + (RSSI_Ave)) / (Rx_Smooth_Factor); } }
@@ -377,7 +377,7 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm,if (pEntry->rssi_stat.ValidBit ==64 ) { Weighting =min_t (u32, OFDM_pkt <<4 ,64 ); - UndecoratedSmoothedPWDB = (Weighting*UndecoratedSmoothedOFDM + (64 -Weighting)*UndecoratedSmoothedCCK)>>6 ; + UndecoratedSmoothedPWDB = (Weighting * UndecoratedSmoothedOFDM + (64 -Weighting) * UndecoratedSmoothedCCK)>>6 ; }else {if (pEntry->rssi_stat.ValidBit !=0 ) UndecoratedSmoothedPWDB = (OFDM_pkt * UndecoratedSmoothedOFDM +
Signature · 1 line
2.19.0
PATCH 3/19 staging: rtl8188eu: remove wrapper odm_SignalScaleMapping()
In reply to Michael StraubeThe function odm_SignalScaleMapping() is just a wrapper for odm_SignalScaleMapping_92CSeries().
Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping() and remove the wrapper.
--- drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/staging/rtl8188eu/hal/odm_hwconfig.c +1 -6
@@ -26,7 +26,7 @@ static u8 odm_QueryRxPwrPercentage(s8 AntPower)/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */ /* IF other SW team do not support the feature, remove this section.?? */ -static s32 odm_SignalScaleMapping_92CSeries (struct odm_dm_struct *dm_odm,s32 CurrSig) +static s32 odm_SignalScaleMapping (struct odm_dm_struct *dm_odm,s32 CurrSig) {s32 RetSig =0 ;
@@ -49,11 +49,6 @@ static s32 odm_SignalScaleMapping_92CSeries(struct odm_dm_struct *dm_odm, s32 Cureturn RetSig; } -static s32 odm_SignalScaleMapping (struct odm_dm_struct *dm_odm,s32 CurrSig) -{ -return odm_SignalScaleMapping_92CSeries (dm_odm, CurrSig); -} -static u8 odm_EVMdbToPercentage (s8 Value) {/* -33dB~0dB to 0%~99% */
Signature · 1 line
2.19.0
Quoted 1 line · Michael Straube
Cleanup all inconsistent indenting reported by smatch.
There are also some others like:
drivers/staging/rtl8188eu/core/rtw_mlme.c:1752: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 24)
1750: if ((ndisauthmode == Ndis802_11AuthModeWPA) ||
1751: (ndisauthmode == Ndis802_11AuthModeWPAPSK))
1752: authmode = _WPA_IE_ID_;
Perhaps smatch can be enhanced to find those too.
Quoted 12 lines · Joe Perches
Quoted 1 line · Michael Straube
Cleanup all inconsistent indenting reported by smatch.
There are also some others like:
drivers/staging/rtl8188eu/core/rtw_mlme.c:1752: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 24)
1750: if ((ndisauthmode ==Ndis802_11AuthModeWPA) ||
1751: (ndisauthmode ==Ndis802_11AuthModeWPAPSK))
1752: authmode = _WPA_IE_ID_;Perhaps smatch can be enhanced to find those too.
Style issues are not something I want to get into... I had hoped that this test would find bugs, because stuff like this looks so suspicious:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +1 -1
@@ -246,7 +246,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) wireless_mode = pregistrypriv->wireless_mode; } -rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode); +rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode); rateLen =rtw_get_rateset_len (pdev_network->SupportedRates);
But I've never found even one bug with the inconsistent indenting check. The other related test about missing curly braces is pretty useful though.
regards,
dan carpenter