staging: rtl8723bs: clean up function names
PATCH 1/1 staging: rtl8723bs: clean up function names
Renames camel case functions in rtw_efuse.h and also removes two function declarations that were never implemented nor called in the source.
Naming problems found using checkpatch.pl tool. The unused functions were discovered while applying the changes.
Signed-off-by Linus Probert <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 34 +++++++++---------- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 33 ++++++++++-------- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +- drivers/staging/rtl8723bs/include/rtw_efuse.h | 14 ++++---- 4 files changed, 43 insertions(+), 40 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +17 -17
@@ -10,7 +10,7 @@/* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */ u8 -Efuse_CalculateWordCnts (u8 word_en) +rtw_efuse_calculate_word_counts (u8 word_en) {u8 word_cnts =0 ;
@@ -26,7 +26,7 @@ Efuse_CalculateWordCnts(u8 word_en) }/*----------------------------------------------------------------------------- -* Function: EFUSE_Read1Byte +* Function: efuse_read_1_byte * * Overview: Copy from WMAC fot EFUSE read 1 byte. *
@@ -42,7 +42,7 @@ Efuse_CalculateWordCnts(u8 word_en)* */ u8 -EFUSE_Read1Byte ( +rtw_efuse_read_1_byte (struct adapter *Adapter,u16 Address) {
@@ -79,11 +79,11 @@ u16 Address) }else return 0xFF ; -}/* EFUSE_Read1Byte */ +}/* efuse_read_1_byte */ /* 11/16/2008 MH Read one byte from real Efuse. */ u8 -efuse_OneByteRead ( +rtw_efuse_one_byte_read (struct adapter *padapter,u16 addr,u8 *data)
@@ -170,7 +170,7 @@ static void Efuse_ReadAllMap(struct adapter *padapter, u8 efuseType, u8 *Efuse)* 11/12/2008 MHC Create Version 0. * */ -static void efuse_ShadowRead1Byte (struct adapter *padapter,u16 Offset,u8 *Value) +static void efuse_shadow_read_1_byte (struct adapter *padapter,u16 Offset,u8 *Value) {struct eeprom_priv *pEEPROM =GET_EEPROM_EFUSE_PRIV (padapter);
@@ -179,7 +179,7 @@ static void efuse_ShadowRead1Byte(struct adapter *padapter, u16 Offset, u8 *Valu }/* EFUSE_ShadowRead1Byte */ /* Read Two Bytes */ -static void efuse_ShadowRead2Byte (struct adapter *padapter,u16 Offset,u16 *Value) +static void efuse_shadow_read_2_byte (struct adapter *padapter,u16 Offset,u16 *Value) {struct eeprom_priv *pEEPROM =GET_EEPROM_EFUSE_PRIV (padapter);
@@ -189,7 +189,7 @@ static void efuse_ShadowRead2Byte(struct adapter *padapter, u16 Offset, u16 *Val }/* EFUSE_ShadowRead2Byte */ /* Read Four Bytes */ -static void efuse_ShadowRead4Byte (struct adapter *padapter,u16 Offset,u32 *Value) +static void efuse_shadow_read_4_byte (struct adapter *padapter,u16 Offset,u32 *Value) {struct eeprom_priv *pEEPROM =GET_EEPROM_EFUSE_PRIV (padapter);
@@ -201,7 +201,7 @@ static void efuse_ShadowRead4Byte(struct adapter *padapter, u16 Offset, u32 *Val }/* efuse_ShadowRead4Byte */ /*----------------------------------------------------------------------------- -* Function: EFUSE_ShadowMapUpdate +* Function: efuse_shadow_map_update * * Overview: Transfer current EFUSE content to shadow init and modify map. *
@@ -216,7 +216,7 @@ static void efuse_ShadowRead4Byte(struct adapter *padapter, u16 Offset, u32 *Val* 11/13/2008 MHC Create Version 0. * */ -void EFUSE_ShadowMapUpdate (struct adapter *padapter,u8 efuseType) +void rtw_efuse_shadow_map_update (struct adapter *padapter,u8 efuseType) {struct eeprom_priv *pEEPROM =GET_EEPROM_EFUSE_PRIV (padapter);u16 mapLen =0 ;
@@ -230,11 +230,11 @@ void EFUSE_ShadowMapUpdate(struct adapter *padapter, u8 efuseType)/* PlatformMoveMemory((void *)&pHalData->EfuseMap[EFUSE_MODIFY_MAP][0], */ /* void *)&pHalData->EfuseMap[EFUSE_INIT_MAP][0], mapLen); */ -}/* EFUSE_ShadowMapUpdate */ +}/* efuse_shadow_map_update */ /*----------------------------------------------------------------------------- -* Function: EFUSE_ShadowRead +* Function: efuse_shadow_read * * Overview: Read from efuse init map !!!!! *
@@ -249,13 +249,13 @@ void EFUSE_ShadowMapUpdate(struct adapter *padapter, u8 efuseType)* 11/12/2008 MHC Create Version 0. * */ -void EFUSE_ShadowRead (struct adapter *padapter,u8 Type,u16 Offset,u32 *Value) +void rtw_efuse_shadow_read (struct adapter *padapter,u8 Type,u16 Offset,u32 *Value) {if (Type ==1 ) -efuse_ShadowRead1Byte (padapter, Offset, (u8 *)Value); +efuse_shadow_read_1_byte (padapter, Offset, (u8 *)Value);else if (Type ==2 ) -efuse_ShadowRead2Byte (padapter, Offset, (u16 *)Value); +efuse_shadow_read_2_byte (padapter, Offset, (u16 *)Value);else if (Type ==4 ) -efuse_ShadowRead4Byte (padapter, Offset, (u32 *)Value); +efuse_shadow_read_4_byte (padapter, Offset, (u32 *)Value); -}/* EFUSE_ShadowRead*/ +}/* efuse_shadow_read*/
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +19 -14
@@ -651,7 +651,7 @@ static void hal_ReadEFuse_WiFi(hal_EfuseSwitchToBank (padapter,0 );while (AVAILABLE_EFUSE_ADDR (eFuse_Addr)) { -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseHeader); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, &efuseHeader);if (efuseHeader ==0xFF )break ;
@@ -659,7 +659,7 @@ static void hal_ReadEFuse_WiFi(if (EXT_HEADER (efuseHeader)) {/* extended header */ offset =GET_HDR_OFFSET_2_0 (efuseHeader); -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseExtHdr); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, &efuseExtHdr);if (ALL_WORDS_DISABLED (efuseExtHdr))continue ;
@@ -678,16 +678,18 @@ static void hal_ReadEFuse_WiFi(for (i =0 ; i <EFUSE_MAX_WORD_UNIT ; i++) {/* Check word enable condition in the section */ if (!(wden & (0x01 <<i))) { -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseData); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, + &efuseData); efuseTbl[addr] = efuseData; -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseData); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, + &efuseData); efuseTbl[addr+1 ] = efuseData; } addr +=2 ; } }else { - eFuse_Addr +=Efuse_CalculateWordCnts (wden)*2 ; + eFuse_Addr +=rtw_efuse_calculate_word_counts (wden)*2 ; } }
@@ -744,7 +746,7 @@ static void hal_ReadEFuse_BT( eFuse_Addr =0 ;while (AVAILABLE_EFUSE_ADDR (eFuse_Addr)) { -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseHeader); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, &efuseHeader);if (efuseHeader ==0xFF )break ;
@@ -752,7 +754,7 @@ static void hal_ReadEFuse_BT(if (EXT_HEADER (efuseHeader)) {/* extended header */ offset =GET_HDR_OFFSET_2_0 (efuseHeader); -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseExtHdr); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, &efuseExtHdr);if (ALL_WORDS_DISABLED (efuseExtHdr))continue ;
@@ -770,16 +772,18 @@ static void hal_ReadEFuse_BT(for (i =0 ; i <EFUSE_MAX_WORD_UNIT ; i++) {/* Check word enable condition in the section */ if (!(wden & (0x01 <<i))) { -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseData); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, + &efuseData); efuseTbl[addr] = efuseData; -efuse_OneByteRead (padapter, eFuse_Addr++, &efuseData); +rtw_efuse_one_byte_read (padapter, eFuse_Addr++, + &efuseData); efuseTbl[addr+1 ] = efuseData; } addr +=2 ; } }else { - eFuse_Addr +=Efuse_CalculateWordCnts (wden)*2 ; + eFuse_Addr +=rtw_efuse_calculate_word_counts (wden)*2 ; } }
@@ -1184,12 +1188,12 @@ void Hal_InitPGData(struct adapter *padapter, u8 *PROMContent)if (!pEEPROM->bautoload_fail_flag) {/* autoload OK. */ if (!pEEPROM->EepromOrEfuse) {/* Read EFUSE real map to shadow. */ -EFUSE_ShadowMapUpdate (padapter,EFUSE_WIFI ); +rtw_efuse_shadow_map_update (padapter,EFUSE_WIFI );memcpy (PROMContent, pEEPROM->efuse_eeprom_data,HWSET_MAX_SIZE_8723B ); } }else {/* autoload fail */ if (!pEEPROM->EepromOrEfuse) -EFUSE_ShadowMapUpdate (padapter,EFUSE_WIFI ); +rtw_efuse_shadow_map_update (padapter,EFUSE_WIFI );memcpy (PROMContent, pEEPROM->efuse_eeprom_data,HWSET_MAX_SIZE_8723B ); } }
@@ -1447,7 +1451,7 @@ void Hal_EfuseParsePackageType_8723B(u8 efuseContent;Hal_EfusePowerSwitch (padapter, true); -efuse_OneByteRead (padapter,0x1FB , &efuseContent); +rtw_efuse_one_byte_read (padapter,0x1FB , &efuseContent);Hal_EfusePowerSwitch (padapter, false); package = efuseContent &0x7 ;
@@ -1555,7 +1559,8 @@ void Hal_ReadRFGainOffset(if (!AutoloadFail) { Adapter->eeprompriv.EEPROMRFGainOffset = PROMContent[EEPROM_RF_GAIN_OFFSET ]; - Adapter->eeprompriv.EEPROMRFGainVal =EFUSE_Read1Byte (Adapter,EEPROM_RF_GAIN_VAL ); + Adapter->eeprompriv.EEPROMRFGainVal =rtw_efuse_read_1_byte (Adapter, +EEPROM_RF_GAIN_VAL ); }else { Adapter->eeprompriv.EEPROMRFGainOffset =0 ; Adapter->eeprompriv.EEPROMRFGainVal =0xFF ;
drivers/staging/rtl8723bs/hal/sdio_halinit.c +1 -1
@@ -574,7 +574,7 @@ static bool HalDetectPwrDownMode(struct adapter *Adapter)struct pwrctrl_priv *pwrctrlpriv =adapter_to_pwrctl (Adapter); -EFUSE_ShadowRead (Adapter,1 ,0x7B /*EEPROM_RF_OPT3_92C*/ , (u32 *)&tmpvalue); +rtw_efuse_shadow_read (Adapter,1 ,0x7B /*EEPROM_RF_OPT3_92C*/ , (u32 *)&tmpvalue);/* 2010/08/25 MH INF priority > PDN Efuse value. */ if (tmpvalue &BIT4 && pwrctrlpriv->reg_pdnmode)
drivers/staging/rtl8723bs/include/rtw_efuse.h +6 -8
@@ -31,7 +31,7 @@ enum {#define EFUSE_REPEAT_THRESHOLD_ 3/* */ -/* The following is for BT Efuse definition */ +/* The following is for BT Efuse definition */ /* */ #define EFUSE_BT_MAX_MAP_LEN 1024#define EFUSE_MAX_BANK 4
@@ -68,13 +68,11 @@ struct efuse_hal { u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN]; }; -u8 Efuse_CalculateWordCnts (u8 word_en); -u8 efuse_OneByteRead (struct adapter *padapter,u16 addr,u8 *data); +u8 rtw_efuse_calculate_word_counts (u8 word_en); +u8 rtw_efuse_one_byte_read (struct adapter *padapter,u16 addr,u8 *data); -u8 EFUSE_Read1Byte (struct adapter *padapter,u16 Address); -void EFUSE_ShadowMapUpdate (struct adapter *padapter,u8 efuseType); -void EFUSE_ShadowRead (struct adapter *padapter,u8 Type,u16 Offset,u32 *Value); -void Rtw_Hal_ReadMACAddrFromFile (struct adapter *padapter); -u32 Rtw_Hal_readPGDataFromConfigFile (struct adapter *padapter); +u8 rtw_efuse_read_1_byte (struct adapter *padapter,u16 Address); +void rtw_efuse_shadow_map_update (struct adapter *padapter,u8 efuseType); +void rtw_efuse_shadow_read (struct adapter *padapter,u8 Type,u16 Offset,u32 *Value);#endif
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerQuoted 6 lines · Linus Probert
Renames camel case functions in
rtw_efuse.hand also removes two function declarations that were never implemented nor called in the source.Naming problems found using checkpatch.pl tool. The unused functions were discovered while applying the changes.
That is two different things, which means this should be a patch series doing only one thing per patch.
thanks,
greg k-h