rename/remove functions and code style cleanup
v3 cover rename/remove functions and code style cleanup
Thanks for the feedback on my last patch. I have adapted the following:
- Split each global function rename into their own patch. (1 - 5)
- Placed the removed functions in their own patch. (6)
- Created one additional patch for removal of a "space before tab" warning. (7)
Br,
Linus
Linus Probert (7):
staging: rtl8723bs: rename global function to snake_case
staging: rtl8723bs: rename global function to snake_case
staging: rtl8723bs: rename global function to snake_case
staging: rtl8723bs: rename global function to snake_case
staging: rtl8723bs: rename global function to snake_case
staging: rtl8723bs: remove unused global functions
staging: rtl8723bs: remove space before tab
drivers/staging/rtl8723bs/core/rtw_efuse.c | 22 ++++++------- .../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, 37 insertions(+), 34 deletions(-)
Signature · 1 line
2.53.0
PATCH v3 1/7 staging: rtl8723bs: rename global function to snake_case
Renames the function Efuse_CalculateWordCnts to rtw_efuse_calculate_word_counts in order to conform to linux code style.
Discovered with checkpatch.pl tool.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -1
@@ -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 ;
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +2 -2
@@ -687,7 +687,7 @@ static void hal_ReadEFuse_WiFi( addr +=2 ; } }else { - eFuse_Addr +=Efuse_CalculateWordCnts (wden)*2 ; + eFuse_Addr +=rtw_efuse_calculate_word_counts (wden)*2 ; } }
@@ -779,7 +779,7 @@ static void hal_ReadEFuse_BT( addr +=2 ; } }else { - eFuse_Addr +=Efuse_CalculateWordCnts (wden)*2 ; + eFuse_Addr +=rtw_efuse_calculate_word_counts (wden)*2 ; } }
drivers/staging/rtl8723bs/include/rtw_efuse.h +1 -1
@@ -68,7 +68,7 @@ struct efuse_hal {u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN ]; }; -u8 Efuse_CalculateWordCnts (u8 word_en); +u8 rtw_efuse_calculate_word_counts (u8 word_en);u8 efuse_OneByteRead (struct adapter *padapter,u16 addr,u8 *data);u8 EFUSE_Read1Byte (struct adapter *padapter,u16 Address);
Signature · 1 line
2.53.0
PATCH v3 2/7 staging: rtl8723bs: rename global function to snake_case
In reply to Linus ProbertRenames efuse_OneByteRead to rtw_efuse_one_byte_read in order to conform to kernel coding style.
Discovered using the checkpatch.pl tool.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 22 +++++++++++-------- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -1
@@ -83,7 +83,7 @@ u16 Address)/* 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)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +13 -9
@@ -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,10 +678,12 @@ 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 ;
@@ -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,10 +772,12 @@ 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 ;
@@ -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 ;
drivers/staging/rtl8723bs/include/rtw_efuse.h +1 -1
@@ -69,7 +69,7 @@ struct efuse_hal { };u8 rtw_efuse_calculate_word_counts (u8 word_en); -u8 efuse_OneByteRead (struct adapter *padapter,u16 addr,u8 *data); +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);
Signature · 1 line
2.53.0
PATCH v3 3/7 staging: rtl8723bs: rename global function to snake_case
In reply to Linus ProbertRenames EFUSE_Read1Byte to rtw_efuse_read_1_byte in order to conform to kernel code styl.
Discovered using checkpatch.pl tool.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 +++--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 ++- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +3 -3
@@ -26,7 +26,7 @@ rtw_efuse_calculate_word_counts(u8 word_en) }/*----------------------------------------------------------------------------- -* Function: EFUSE_Read1Byte +* Function: rtw_efuse_read_1_byte * * Overview: Copy from WMAC fot EFUSE read 1 byte. *
@@ -42,7 +42,7 @@ rtw_efuse_calculate_word_counts(u8 word_en)* */ u8 -EFUSE_Read1Byte ( +rtw_efuse_read_1_byte (struct adapter *Adapter,u16 Address) {
@@ -79,7 +79,7 @@ u16 Address) }else return 0xFF ; -}/* EFUSE_Read1Byte */ +}/* rtw_efuse_read_1_byte */ /* 11/16/2008 MH Read one byte from real Efuse. */ u8
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +2 -1
@@ -1559,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/include/rtw_efuse.h +1 -1
@@ -71,7 +71,7 @@ struct efuse_hal {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); +u8 rtw_efuse_read_1_byte (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);
Signature · 1 line
2.53.0
PATCH v3 4/7 staging: rtl8723bs: rename global function to snake_case
In reply to Linus ProbertRenames EFUSE_ShadowMapUpdate to rtw_shadow_map_update in order to conform to kernel code style.
Discovered using checkpatch.pl tool.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 +++--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +3 -3
@@ -201,7 +201,7 @@ static void efuse_ShadowRead4Byte(struct adapter *padapter, u16 Offset, u32 *Val }/* efuse_ShadowRead4Byte */ /*----------------------------------------------------------------------------- -* Function: EFUSE_ShadowMapUpdate +* Function: rtw_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,7 +230,7 @@ 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 */ +}/* rtw_efuse_shadow_map_update */ /*-----------------------------------------------------------------------------
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +2 -2
@@ -1188,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 ); } }
drivers/staging/rtl8723bs/include/rtw_efuse.h +1 -1
@@ -72,7 +72,7 @@ u8 rtw_efuse_calculate_word_counts(u8 word_en);u8 rtw_efuse_one_byte_read (struct adapter *padapter,u16 addr,u8 *data);u8 rtw_efuse_read_1_byte (struct adapter *padapter,u16 Address); -void EFUSE_ShadowMapUpdate (struct adapter *padapter,u8 efuseType); +void rtw_efuse_shadow_map_update (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);
Signature · 1 line
2.53.0
PATCH v3 5/7 staging: rtl8723bs: rename global function to snake_case
In reply to Linus ProbertRenames EFUSE_ShadowRead to rtw_efuse_shadow_read to conform to kernel code style.
Discovered using checkpatch.pl tool.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 +++--- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +3 -3
@@ -234,7 +234,7 @@ void rtw_efuse_shadow_map_update(struct adapter *padapter, u8 efuseType)/*----------------------------------------------------------------------------- -* Function: EFUSE_ShadowRead +* Function: rtw_efuse_shadow_read * * Overview: Read from efuse init map !!!!! *
@@ -249,7 +249,7 @@ void rtw_efuse_shadow_map_update(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);
@@ -258,4 +258,4 @@ void EFUSE_ShadowRead(struct adapter *padapter, u8 Type, u16 Offset, u32 *Value)else if (Type ==4 )efuse_ShadowRead4Byte (padapter, Offset, (u32 *)Value); -}/* EFUSE_ShadowRead*/ +}/* rtw_efuse_shadow_read*/
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 +1 -1
@@ -73,7 +73,7 @@ u8 rtw_efuse_one_byte_read(struct adapter *padapter, u16 addr, u8 *data);u8 rtw_efuse_read_1_byte (struct adapter *padapter,u16 Address);void rtw_efuse_shadow_map_update (struct adapter *padapter,u8 efuseType); -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);void Rtw_Hal_ReadMACAddrFromFile (struct adapter *padapter);u32 Rtw_Hal_readPGDataFromConfigFile (struct adapter *padapter);
Signature · 1 line
2.53.0
PATCH v3 6/7 staging: rtl8723bs: remove unused global functions
In reply to Linus ProbertRemoves two unused functions Rtw_Hal_ReadMACAddrFromFile and Rtw_Hal_readPGDataFromConfigFile from rtw_efuse.h.
The functions only existed in this header. No implementation or calls were present in the code.
--- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/include/rtw_efuse.h +0 -2
@@ -74,7 +74,5 @@ u8 rtw_efuse_one_byte_read(struct adapter *padapter, u16 addr, u8 *data);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); -void Rtw_Hal_ReadMACAddrFromFile (struct adapter *padapter); -u32 Rtw_Hal_readPGDataFromConfigFile (struct adapter *padapter);#endif
Signature · 1 line
2.53.0
PATCH v3 7/7 staging: rtl8723bs: remove space before tab
In reply to Linus ProbertRemoves a space before tab according to kernel code style. Discovered using the checkpatch.pl tool.
--- drivers/staging/rtl8723bs/include/rtw_efuse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/include/rtw_efuse.h +1 -1
@@ -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
Signature · 1 line
2.53.0
Quoted 19 lines · Linus Probert
Thanks for the feedback on my last patch. I have adapted the following:
- Split each global function rename into their own patch. (1 - 5)
- Placed the removed functions in their own patch. (6)
- Created one additional patch for removal of a "space before tab" warning. (7)Br,
LinusLinus Probert (7):
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: remove unused global functions
staging: rtl8723bs: remove space before tab
Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_efuse.c | 22 ++++++------- .../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, 37 insertions(+), 34 deletions(-)
Please add "staging: rtl8723bs" to your cover letter header. I have a filter for rtl8723bs and not getting your cover letter was very confusing.
You don't have to resend the series for this reason however.
Thanks,
ET
Greg Kroah-Hartman
maintainerQuoted 10 lines · Linus Probert
Thanks for the feedback on my last patch. I have adapted the following:
- Split each global function rename into their own patch. (1 - 5)
- Placed the removed functions in their own patch. (6)
- Created one additional patch for removal of a "space before tab" warning. (7)Br,
Linus
Quoted 6 lines
Linus Probert (7):
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
staging: rtl8723bs: rename global function tosnake_case
You have 5 different patches here with the same subject line, yet they do different things. Please make these unique, otherwise this looks very odd, don't you think?
And the changelog is the hardest part of writing a patch, as you are finding out :)
thanks,
greg k-h