staging: rtl8723bs: remove dead functions
cover staging: rtl8723bs: remove dead functions
Remove some functions in this driver because they are not used anywhere.
Nam Cao (7):
staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
staging: rtl8723bs: remove function rtw_get_ch_setting_union
staging: rtl8723bs: remove function rtw_odm_ability_set
staging: rtl8723bs: remove function GetFractionValueFromString
staging: rtl8723bs: remove function IsCommentString
staging: rtl8723bs: remove function rtw_odm_adaptivity_parm_msg
staging: rtl8723bs: remove function rtw_odm_dbg_comp_set
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 ------- drivers/staging/rtl8723bs/core/rtw_odm.c | 44 --------------- drivers/staging/rtl8723bs/hal/hal_com.c | 55 ------------------- drivers/staging/rtl8723bs/include/hal_com.h | 5 -- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 - drivers/staging/rtl8723bs/include/rtw_odm.h | 4 -- 6 files changed, 130 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/7 staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
because this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 16 ---------------- drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -16
@@ -90,22 +90,6 @@ static const char * const odm_dbg_level_str[] = {#define RTW_ODM_DBG_LEVEL_NUM 6 -void rtw_odm_dbg_comp_msg (struct adapter *adapter) -{ -u64 dbg_comp; -int i; - -rtw_hal_get_def_var (adapter,HW_DEF_ODM_DBG_FLAG , &dbg_comp); -netdev_dbg (adapter->pnetdev,"odm.DebugComponents = 0x%016llx\n" , - dbg_comp); -for (i =0 ; i <RTW_ODM_COMP_MAX ; i++) { -if (odm_comp_str[i]) -netdev_dbg (adapter->pnetdev,"%cBIT%-2d %s\n" , - (BIT0 << i) & dbg_comp ?'+' :' ' , i, - odm_comp_str[i]); - } -} -inline void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps) {rtw_hal_set_def_var (adapter,HW_DEF_ODM_DBG_FLAG , &comps);
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -13,7 +13,6 @@* This file provides utilities/wrappers for rtw driver to use ODM */ -void rtw_odm_dbg_comp_msg (struct adapter *adapter);void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps);void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter);void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level);
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH 1/7] staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
Thank you for the patch! Perhaps something to improve:
Hi Nam,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Nam-Cao/staging-rtl8723bs-remove-dead-functions/20220819-165905 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 8379cf83fe6d57a12952de6dcaf7a7fbd7b364fc config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220819/[email protected]/config) compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/3b86aa03519d904d916cb62a1113c0c5549496cb git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Nam-Cao/staging-rtl8723bs-remove-dead-functions/20220819-165905 git checkout 3b86aa03519d904d916cb62a1113c0c5549496cb # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/staging/rtl8723bs/
If you fix the issue, kindly add following tag where applicable
All warnings (new ones prefixed by >>):
>> drivers/staging/rtl8723bs/core/rtw_odm.c:13:27: warning: 'odm_comp_str' defined but not used [-Wunused-const-variable=]
13 | static const char * const odm_comp_str[] = {
| ^~~~~~~~~~~~vim +/odm_comp_str +13 drivers/staging/rtl8723bs/core/rtw_odm.c
554c0a3abf216c Hans de Goede 2017-03-29 12
05031914cb8f5b Tom Gardi 2017-08-12 @13 static const char * const odm_comp_str[] = {
554c0a3abf216c Hans de Goede 2017-03-29 14 /* BIT0 */"ODM_COMP_DIG",
554c0a3abf216c Hans de Goede 2017-03-29 15 /* BIT1 */"ODM_COMP_RA_MASK",
554c0a3abf216c Hans de Goede 2017-03-29 16 /* BIT2 */"ODM_COMP_DYNAMIC_TXPWR",
554c0a3abf216c Hans de Goede 2017-03-29 17 /* BIT3 */"ODM_COMP_FA_CNT",
554c0a3abf216c Hans de Goede 2017-03-29 18 /* BIT4 */"ODM_COMP_RSSI_MONITOR",
554c0a3abf216c Hans de Goede 2017-03-29 19 /* BIT5 */"ODM_COMP_CCK_PD",
554c0a3abf216c Hans de Goede 2017-03-29 20 /* BIT6 */"ODM_COMP_ANT_DIV",
554c0a3abf216c Hans de Goede 2017-03-29 21 /* BIT7 */"ODM_COMP_PWR_SAVE",
554c0a3abf216c Hans de Goede 2017-03-29 22 /* BIT8 */"ODM_COMP_PWR_TRAIN",
554c0a3abf216c Hans de Goede 2017-03-29 23 /* BIT9 */"ODM_COMP_RATE_ADAPTIVE",
554c0a3abf216c Hans de Goede 2017-03-29 24 /* BIT10 */"ODM_COMP_PATH_DIV",
554c0a3abf216c Hans de Goede 2017-03-29 25 /* BIT11 */"ODM_COMP_PSD",
554c0a3abf216c Hans de Goede 2017-03-29 26 /* BIT12 */"ODM_COMP_DYNAMIC_PRICCA",
554c0a3abf216c Hans de Goede 2017-03-29 27 /* BIT13 */"ODM_COMP_RXHP",
554c0a3abf216c Hans de Goede 2017-03-29 28 /* BIT14 */"ODM_COMP_MP",
554c0a3abf216c Hans de Goede 2017-03-29 29 /* BIT15 */"ODM_COMP_DYNAMIC_ATC",
554c0a3abf216c Hans de Goede 2017-03-29 30 /* BIT16 */"ODM_COMP_EDCA_TURBO",
554c0a3abf216c Hans de Goede 2017-03-29 31 /* BIT17 */"ODM_COMP_EARLY_MODE",
554c0a3abf216c Hans de Goede 2017-03-29 32 /* BIT18 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 33 /* BIT19 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 34 /* BIT20 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 35 /* BIT21 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 36 /* BIT22 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 37 /* BIT23 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 38 /* BIT24 */"ODM_COMP_TX_PWR_TRACK",
554c0a3abf216c Hans de Goede 2017-03-29 39 /* BIT25 */"ODM_COMP_RX_GAIN_TRACK",
554c0a3abf216c Hans de Goede 2017-03-29 40 /* BIT26 */"ODM_COMP_CALIBRATION",
554c0a3abf216c Hans de Goede 2017-03-29 41 /* BIT27 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 42 /* BIT28 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 43 /* BIT29 */NULL,
554c0a3abf216c Hans de Goede 2017-03-29 44 /* BIT30 */"ODM_COMP_COMMON",
554c0a3abf216c Hans de Goede 2017-03-29 45 /* BIT31 */"ODM_COMP_INIT",
554c0a3abf216c Hans de Goede 2017-03-29 46 };554c0a3abf216c Hans de Goede 2017-03-29 47
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
v2 cover remove some dead code
Remove some unused functions and variables.
Change in v2: add a new patch to fix kernel test robot's warning about unused variable.
Nam Cao (8):
staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
staging: rtl8723bs: remove function rtw_get_ch_setting_union
staging: rtl8723bs: remove function rtw_odm_ability_set
staging: rtl8723bs: remove function GetFractionValueFromString
staging: rtl8723bs: remove function IsCommentString
staging: rtl8723bs: remove function rtw_odm_adaptivity_parm_msg
staging: rtl8723bs: remove function rtw_odm_dbg_comp_set
staging: rtl8723bs: remove static const variable odm_comp_str
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 ----- drivers/staging/rtl8723bs/core/rtw_odm.c | 79 ------------------- drivers/staging/rtl8723bs/hal/hal_com.c | 55 ------------- drivers/staging/rtl8723bs/include/hal_com.h | 5 -- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 - drivers/staging/rtl8723bs/include/rtw_odm.h | 4 - 6 files changed, 165 deletions(-)
Signature · 1 line
2.25.1
PATCH v2 1/8 staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
because this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 16 ---------------- drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -16
@@ -90,22 +90,6 @@ static const char * const odm_dbg_level_str[] = {#define RTW_ODM_DBG_LEVEL_NUM 6 -void rtw_odm_dbg_comp_msg (struct adapter *adapter) -{ -u64 dbg_comp; -int i; - -rtw_hal_get_def_var (adapter,HW_DEF_ODM_DBG_FLAG , &dbg_comp); -netdev_dbg (adapter->pnetdev,"odm.DebugComponents = 0x%016llx\n" , - dbg_comp); -for (i =0 ; i <RTW_ODM_COMP_MAX ; i++) { -if (odm_comp_str[i]) -netdev_dbg (adapter->pnetdev,"%cBIT%-2d %s\n" , - (BIT0 << i) & dbg_comp ?'+' :' ' , i, - odm_comp_str[i]); - } -} -inline void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps) {rtw_hal_set_def_var (adapter,HW_DEF_ODM_DBG_FLAG , &comps);
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -13,7 +13,6 @@* This file provides utilities/wrappers for rtw driver to use ODM */ -void rtw_odm_dbg_comp_msg (struct adapter *adapter);void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps);void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter);void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level);
Signature · 1 line
2.25.1
Re: [PATCH v2 1/8] staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
Quoted 3 lines · Nam Cao
because this function is not used.
Signed-off-by Nam Cao <[email protected]>
This patch is fine, but in the future can you please treat the subject as separate from the commit message. "because it is not used" is a sucky commit message. What is not used? What are you doing to it? It doesn't start with a capital letter.
Here is how your email looks like on lore.
Try to find the subject in the middle of the block of text. People are often only going to read the body of the email.
[PATCH v2 1/8] staging: rtl8723bs: remove rtw_odm_dbg_comp_msg()
The rtw_odm_dbg_comp_msg() function is not used. Delete it.
Signed-off-by:
regards,
dan carpenter
Re: [PATCH v2 1/8] staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
Thank you so much for letting me know. I will try to make it more readable in the future.
Best regards,
Nam
Quoted 27 lines · Dan Carpenter
Quoted 3 lines · Nam Cao
because this function is not used.
Signed-off-by Nam Cao <[email protected]>This patch is fine, but in the future can you please treat the subject as separate from the commit message. "because it is not used" is a sucky commit message. What is not used? What are you doing to it? It doesn't start with a capital letter.
Here is how your email looks like on lore.
Try to find the subject in the middle of the block of text. People are often only going to read the body of the email.
[PATCH v2 1/8] staging: rtl8723bs: remove
rtw_odm_dbg_comp_msg()The
rtw_odm_dbg_comp_msg()function is not used. Delete it.Signed-off-by:
regards,
dan carpenter
PATCH v2 2/8 staging: rtl8723bs: remove function rtw_get_ch_setting_union
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 ------------------- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 - 2 files changed, 22 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -21
@@ -5945,27 +5945,6 @@ int rtw_chk_start_clnt_join(struct adapter *padapter, u8 *ch, u8 *bw, u8 *offsetreturn connect_allow ? _SUCCESS : _FAIL; } -/* Find union about ch, bw, ch_offset of all linked/linking interfaces */ -int rtw_get_ch_setting_union (struct adapter *adapter,u8 *ch,u8 *bw,u8 *offset) -{ -struct dvobj_priv *dvobj =adapter_to_dvobj (adapter); -struct adapter *iface; - -if (ch) - *ch =0 ; -if (bw) - *bw =CHANNEL_WIDTH_20 ; -if (offset) - *offset =HAL_PRIME_CHNL_OFFSET_DONT_CARE ; - - iface = dvobj->padapters; - -if (!check_fwstate (&iface->mlmepriv, _FW_LINKED|_FW_UNDER_LINKING)) -return 0 ; - -return 1 ; -} -u8 set_ch_hdl (struct adapter *padapter,u8 *pbuf) {struct set_ch_parm *set_ch_parm;
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +0 -1
@@ -662,7 +662,6 @@ extern void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uintextern u8 traffic_status_watchdog (struct adapter *padapter,u8 from_timer);int rtw_chk_start_clnt_join (struct adapter *padapter,u8 *ch,u8 *bw,u8 *offset); -int rtw_get_ch_setting_union (struct adapter *adapter,u8 *ch,u8 *bw,u8 *offset);struct cmd_hdl {uint parmsize;
Signature · 1 line
2.25.1
PATCH v2 3/8 staging: rtl8723bs: remove function rtw_odm_ability_set
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -5
@@ -129,11 +129,6 @@ void rtw_odm_ability_msg(void *sel, struct adapter *adapter) } } -inline void rtw_odm_ability_set (struct adapter *adapter,u32 ability) -{ -rtw_hal_set_hwreg (adapter,HW_VAR_DM_FLAG , (u8 *)&ability); -} -void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter) {struct hal_com_data *pHalData =GET_HAL_DATA (adapter);
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -18,7 +18,6 @@ void rtw_odm_dbg_level_msg(void *sel, struct adapter *adapter);void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level);void rtw_odm_ability_msg (void *sel,struct adapter *adapter); -void rtw_odm_ability_set (struct adapter *adapter,u32 ability);void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter); void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff,
Signature · 1 line
2.25.1
PATCH v2 4/8 staging: rtl8723bs: remove function GetFractionValueFromString
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 43 --------------------- drivers/staging/rtl8723bs/include/hal_com.h | 3 -- 2 files changed, 46 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +0 -43
@@ -939,49 +939,6 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)return true; } -bool GetFractionValueFromString ( -char *szStr,u8 *pInteger,u8 *pFraction,u32 *pu4bMove -) -{ -char *szScan = szStr; - -/* Initialize output. */ - *pu4bMove =0 ; - *pInteger =0 ; - *pFraction =0 ; - -/* Skip leading space. */ -while (*szScan !='\0' && (*szScan ==' ' || *szScan =='\t' )) { - ++szScan; - ++(*pu4bMove); - } - -/* Parse each digit. */ -do { - (*pInteger) *=10 ; - *pInteger += (*szScan -'0' ); - - ++szScan; - ++(*pu4bMove); - -if (*szScan =='.' ) { - ++szScan; - ++(*pu4bMove); - -if (*szScan <'0' || *szScan >'9' ) -return false; -else { - *pFraction = *szScan -'0' ; - ++szScan; - ++(*pu4bMove); -return true; - } - } - }while (*szScan >='0' && *szScan <='9' ); - -return true; -} -/* */ /* Description: */ /* Return true if szStr is comment out with leading "//". */
drivers/staging/rtl8723bs/include/hal_com.h +0 -3
@@ -153,9 +153,6 @@ u32 MapCharToHexDigit(char chTmp);bool GetHexValueFromString (char *szStr,u32 *pu4bVal,u32 *pu4bMove); -bool GetFractionValueFromString (char *szStr,u8 *pInteger,u8 *pFraction, -u32 *pu4bMove); -bool IsCommentString (char *szStr); bool ParseQualifiedString(char *In, u32 *Start, char *Out, char LeftQualifier,
Signature · 1 line
2.25.1
PATCH v2 5/8 staging: rtl8723bs: remove function IsCommentString
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 12 ------------ drivers/staging/rtl8723bs/include/hal_com.h | 2 -- 2 files changed, 14 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +0 -12
@@ -939,18 +939,6 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)return true; } -/* */ -/* Description: */ -/* Return true if szStr is comment out with leading "//". */ -/* */ -bool IsCommentString (char *szStr) -{ -if (*szStr =='/' && *(szStr+1 ) =='/' ) -return true; -else -return false; -} -bool GetU1ByteIntegerFromStringInDecimal (char *Str,u8 *pInt) {u16 i =0 ;
drivers/staging/rtl8723bs/include/hal_com.h +0 -2
@@ -153,8 +153,6 @@ u32 MapCharToHexDigit(char chTmp);bool GetHexValueFromString (char *szStr,u32 *pu4bVal,u32 *pu4bMove); -bool IsCommentString (char *szStr); -bool ParseQualifiedString (char *In,u32 *Start,char *Out,char LeftQualifier,char RightQualifier);
Signature · 1 line
2.25.1
PATCH v2 6/8 staging: rtl8723bs: remove function rtw_odm_adaptivity_parm_msg
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 18 ------------------ drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 19 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -18
@@ -129,24 +129,6 @@ void rtw_odm_ability_msg(void *sel, struct adapter *adapter) } } -void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter) -{ -struct hal_com_data *pHalData =GET_HAL_DATA (adapter); -struct dm_odm_t *odm = &pHalData->odmpriv; - -netdev_dbg (adapter->pnetdev,"%10s %16s %8s %10s %11s %14s\n" , -"TH_L2H_ini" ,"TH_EDCCA_HL_diff" ,"IGI_Base" ,"ForceEDCCA" , -"AdapEn_RSSI" ,"IGI_LowerBound" ); -netdev_dbg (adapter->pnetdev, -"0x%-8x %-16d 0x%-6x %-10d %-11u %-14u\n" , - (u8 )odm->TH_L2H_ini, - odm->TH_EDCCA_HL_diff, - odm->IGI_Base, - odm->ForceEDCCA, - odm->AdapEn_RSSI, - odm->IGI_LowerBound); -} - void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff, s8 IGI_Base, bool ForceEDCCA, u8 AdapEn_RSSI,
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -19,7 +19,6 @@ void rtw_odm_dbg_level_set(struct adapter *adapter, u32 level);void rtw_odm_ability_msg (void *sel,struct adapter *adapter); -void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter);void rtw_odm_adaptivity_parm_set (struct adapter *adapter,s8 TH_L2H_ini,s8 TH_EDCCA_HL_diff,s8 IGI_Base,bool ForceEDCCA,u8 AdapEn_RSSI,u8 IGI_LowerBound);void rtw_odm_get_perpkt_rssi (void *sel,struct adapter *adapter);
Signature · 1 line
2.25.1
PATCH v2 7/8 staging: rtl8723bs: remove function rtw_odm_dbg_comp_set
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -5
@@ -90,11 +90,6 @@ static const char * const odm_dbg_level_str[] = {#define RTW_ODM_DBG_LEVEL_NUM 6 -inline void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps) -{ -rtw_hal_set_def_var (adapter,HW_DEF_ODM_DBG_FLAG , &comps); -} -void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter) {u32 dbg_level;
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -13,7 +13,6 @@* This file provides utilities/wrappers for rtw driver to use ODM */ -void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps);void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter);void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level);
Signature · 1 line
2.25.1
PATCH v2 8/8 staging: rtl8723bs: remove static const variable odm_comp_str
In reply to Nam Caobecause it is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 35 ------------------------ 1 file changed, 35 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -35
@@ -10,41 +10,6 @@#include <rtw_odm.h> #include <hal_data.h> -static const char *const odm_comp_str[] = { -/* BIT0 */ "ODM_COMP_DIG" , -/* BIT1 */ "ODM_COMP_RA_MASK" , -/* BIT2 */ "ODM_COMP_DYNAMIC_TXPWR" , -/* BIT3 */ "ODM_COMP_FA_CNT" , -/* BIT4 */ "ODM_COMP_RSSI_MONITOR" , -/* BIT5 */ "ODM_COMP_CCK_PD" , -/* BIT6 */ "ODM_COMP_ANT_DIV" , -/* BIT7 */ "ODM_COMP_PWR_SAVE" , -/* BIT8 */ "ODM_COMP_PWR_TRAIN" , -/* BIT9 */ "ODM_COMP_RATE_ADAPTIVE" , -/* BIT10 */ "ODM_COMP_PATH_DIV" , -/* BIT11 */ "ODM_COMP_PSD" , -/* BIT12 */ "ODM_COMP_DYNAMIC_PRICCA" , -/* BIT13 */ "ODM_COMP_RXHP" , -/* BIT14 */ "ODM_COMP_MP" , -/* BIT15 */ "ODM_COMP_DYNAMIC_ATC" , -/* BIT16 */ "ODM_COMP_EDCA_TURBO" , -/* BIT17 */ "ODM_COMP_EARLY_MODE" , -/* BIT18 */ NULL , -/* BIT19 */ NULL , -/* BIT20 */ NULL , -/* BIT21 */ NULL , -/* BIT22 */ NULL , -/* BIT23 */ NULL , -/* BIT24 */ "ODM_COMP_TX_PWR_TRACK" , -/* BIT25 */ "ODM_COMP_RX_GAIN_TRACK" , -/* BIT26 */ "ODM_COMP_CALIBRATION" , -/* BIT27 */ NULL , -/* BIT28 */ NULL , -/* BIT29 */ NULL , -/* BIT30 */ "ODM_COMP_COMMON" , -/* BIT31 */ "ODM_COMP_INIT" , -}; -#define RTW_ODM_COMP_MAX 32static const char *const odm_ability_str[] = {
Signature · 1 line
2.25.1
Re: [PATCH v2 0/8] remove some dead code
In reply to Nam CaoHi,
Quoted 15 lines · Nam Cao
Remove some unused functions and variables.
Change in v2: add a new patch to fix kernel test robot's warning about unused variable.
Nam Cao (8):
staging: rtl8723bs: remove functionrtw_odm_dbg_comp_msg
staging: rtl8723bs: remove functionrtw_get_ch_setting_union
staging: rtl8723bs: remove functionrtw_odm_ability_set
staging: rtl8723bs: remove function GetFractionValueFromString
staging: rtl8723bs: remove function IsCommentString
staging: rtl8723bs: remove functionrtw_odm_adaptivity_parm_msg
staging: rtl8723bs: remove functionrtw_odm_dbg_comp_set
staging: rtl8723bs: remove static const variableodm_comp_str
Quoted 7 lines
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 ----- drivers/staging/rtl8723bs/core/rtw_odm.c | 79 ------------------- drivers/staging/rtl8723bs/hal/hal_com.c | 55 ------------- drivers/staging/rtl8723bs/include/hal_com.h | 5 -- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 - drivers/staging/rtl8723bs/include/rtw_odm.h | 4 - 6 files changed, 165 deletions(-)
Thanks, the entire series looks good to me:
for the series.
Regards,
Hans
PATCH 2/7 staging: rtl8723bs: remove function rtw_get_ch_setting_union
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 ------------------- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 - 2 files changed, 22 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -21
@@ -5945,27 +5945,6 @@ int rtw_chk_start_clnt_join(struct adapter *padapter, u8 *ch, u8 *bw, u8 *offsetreturn connect_allow ? _SUCCESS : _FAIL; } -/* Find union about ch, bw, ch_offset of all linked/linking interfaces */ -int rtw_get_ch_setting_union (struct adapter *adapter,u8 *ch,u8 *bw,u8 *offset) -{ -struct dvobj_priv *dvobj =adapter_to_dvobj (adapter); -struct adapter *iface; - -if (ch) - *ch =0 ; -if (bw) - *bw =CHANNEL_WIDTH_20 ; -if (offset) - *offset =HAL_PRIME_CHNL_OFFSET_DONT_CARE ; - - iface = dvobj->padapters; - -if (!check_fwstate (&iface->mlmepriv, _FW_LINKED|_FW_UNDER_LINKING)) -return 0 ; - -return 1 ; -} -u8 set_ch_hdl (struct adapter *padapter,u8 *pbuf) {struct set_ch_parm *set_ch_parm;
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +0 -1
@@ -662,7 +662,6 @@ extern void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uintextern u8 traffic_status_watchdog (struct adapter *padapter,u8 from_timer);int rtw_chk_start_clnt_join (struct adapter *padapter,u8 *ch,u8 *bw,u8 *offset); -int rtw_get_ch_setting_union (struct adapter *adapter,u8 *ch,u8 *bw,u8 *offset);struct cmd_hdl {uint parmsize;
Signature · 1 line
2.25.1
PATCH 3/7 staging: rtl8723bs: remove function rtw_odm_ability_set
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -5
@@ -129,11 +129,6 @@ void rtw_odm_ability_msg(void *sel, struct adapter *adapter) } } -inline void rtw_odm_ability_set (struct adapter *adapter,u32 ability) -{ -rtw_hal_set_hwreg (adapter,HW_VAR_DM_FLAG , (u8 *)&ability); -} -void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter) {struct hal_com_data *pHalData =GET_HAL_DATA (adapter);
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -18,7 +18,6 @@ void rtw_odm_dbg_level_msg(void *sel, struct adapter *adapter);void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level);void rtw_odm_ability_msg (void *sel,struct adapter *adapter); -void rtw_odm_ability_set (struct adapter *adapter,u32 ability);void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter); void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff,
Signature · 1 line
2.25.1
PATCH 4/7 staging: rtl8723bs: remove function GetFractionValueFromString
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 43 --------------------- drivers/staging/rtl8723bs/include/hal_com.h | 3 -- 2 files changed, 46 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +0 -43
@@ -939,49 +939,6 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)return true; } -bool GetFractionValueFromString ( -char *szStr,u8 *pInteger,u8 *pFraction,u32 *pu4bMove -) -{ -char *szScan = szStr; - -/* Initialize output. */ - *pu4bMove =0 ; - *pInteger =0 ; - *pFraction =0 ; - -/* Skip leading space. */ -while (*szScan !='\0' && (*szScan ==' ' || *szScan =='\t' )) { - ++szScan; - ++(*pu4bMove); - } - -/* Parse each digit. */ -do { - (*pInteger) *=10 ; - *pInteger += (*szScan -'0' ); - - ++szScan; - ++(*pu4bMove); - -if (*szScan =='.' ) { - ++szScan; - ++(*pu4bMove); - -if (*szScan <'0' || *szScan >'9' ) -return false; -else { - *pFraction = *szScan -'0' ; - ++szScan; - ++(*pu4bMove); -return true; - } - } - }while (*szScan >='0' && *szScan <='9' ); - -return true; -} -/* */ /* Description: */ /* Return true if szStr is comment out with leading "//". */
drivers/staging/rtl8723bs/include/hal_com.h +0 -3
@@ -153,9 +153,6 @@ u32 MapCharToHexDigit(char chTmp);bool GetHexValueFromString (char *szStr,u32 *pu4bVal,u32 *pu4bMove); -bool GetFractionValueFromString (char *szStr,u8 *pInteger,u8 *pFraction, -u32 *pu4bMove); -bool IsCommentString (char *szStr); bool ParseQualifiedString(char *In, u32 *Start, char *Out, char LeftQualifier,
Signature · 1 line
2.25.1
PATCH 5/7 staging: rtl8723bs: remove function IsCommentString
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 12 ------------ drivers/staging/rtl8723bs/include/hal_com.h | 2 -- 2 files changed, 14 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +0 -12
@@ -939,18 +939,6 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)return true; } -/* */ -/* Description: */ -/* Return true if szStr is comment out with leading "//". */ -/* */ -bool IsCommentString (char *szStr) -{ -if (*szStr =='/' && *(szStr+1 ) =='/' ) -return true; -else -return false; -} -bool GetU1ByteIntegerFromStringInDecimal (char *Str,u8 *pInt) {u16 i =0 ;
drivers/staging/rtl8723bs/include/hal_com.h +0 -2
@@ -153,8 +153,6 @@ u32 MapCharToHexDigit(char chTmp);bool GetHexValueFromString (char *szStr,u32 *pu4bVal,u32 *pu4bMove); -bool IsCommentString (char *szStr); -bool ParseQualifiedString (char *In,u32 *Start,char *Out,char LeftQualifier,char RightQualifier);
Signature · 1 line
2.25.1
PATCH 6/7 staging: rtl8723bs: remove function rtw_odm_adaptivity_parm_msg
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 18 ------------------ drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 19 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -18
@@ -129,24 +129,6 @@ void rtw_odm_ability_msg(void *sel, struct adapter *adapter) } } -void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter) -{ -struct hal_com_data *pHalData =GET_HAL_DATA (adapter); -struct dm_odm_t *odm = &pHalData->odmpriv; - -netdev_dbg (adapter->pnetdev,"%10s %16s %8s %10s %11s %14s\n" , -"TH_L2H_ini" ,"TH_EDCCA_HL_diff" ,"IGI_Base" ,"ForceEDCCA" , -"AdapEn_RSSI" ,"IGI_LowerBound" ); -netdev_dbg (adapter->pnetdev, -"0x%-8x %-16d 0x%-6x %-10d %-11u %-14u\n" , - (u8 )odm->TH_L2H_ini, - odm->TH_EDCCA_HL_diff, - odm->IGI_Base, - odm->ForceEDCCA, - odm->AdapEn_RSSI, - odm->IGI_LowerBound); -} - void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff, s8 IGI_Base, bool ForceEDCCA, u8 AdapEn_RSSI,
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -19,7 +19,6 @@ void rtw_odm_dbg_level_set(struct adapter *adapter, u32 level);void rtw_odm_ability_msg (void *sel,struct adapter *adapter); -void rtw_odm_adaptivity_parm_msg (void *sel,struct adapter *adapter);void rtw_odm_adaptivity_parm_set (struct adapter *adapter,s8 TH_L2H_ini,s8 TH_EDCCA_HL_diff,s8 IGI_Base,bool ForceEDCCA,u8 AdapEn_RSSI,u8 IGI_LowerBound);void rtw_odm_get_perpkt_rssi (void *sel,struct adapter *adapter);
Signature · 1 line
2.25.1
PATCH 7/7 staging: rtl8723bs: remove function rtw_odm_dbg_comp_set
In reply to Nam Caobecause this function is not used.
--- drivers/staging/rtl8723bs/core/rtw_odm.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_odm.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_odm.c +0 -5
@@ -90,11 +90,6 @@ static const char * const odm_dbg_level_str[] = {#define RTW_ODM_DBG_LEVEL_NUM 6 -inline void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps) -{ -rtw_hal_set_def_var (adapter,HW_DEF_ODM_DBG_FLAG , &comps); -} -void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter) {u32 dbg_level;
drivers/staging/rtl8723bs/include/rtw_odm.h +0 -1
@@ -13,7 +13,6 @@* This file provides utilities/wrappers for rtw driver to use ODM */ -void rtw_odm_dbg_comp_set (struct adapter *adapter,u64 comps);void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter);void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level);
Signature · 1 line
2.25.1
Hi,
Quoted 11 lines · Nam Cao
Remove some functions in this driver because they are not used anywhere.
Nam Cao (7):
staging: rtl8723bs: remove functionrtw_odm_dbg_comp_msg
staging: rtl8723bs: remove functionrtw_get_ch_setting_union
staging: rtl8723bs: remove functionrtw_odm_ability_set
staging: rtl8723bs: remove function GetFractionValueFromString
staging: rtl8723bs: remove function IsCommentString
staging: rtl8723bs: remove functionrtw_odm_adaptivity_parm_msg
staging: rtl8723bs: remove functionrtw_odm_dbg_comp_set
Quoted 7 lines
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 ------- drivers/staging/rtl8723bs/core/rtw_odm.c | 44 --------------- drivers/staging/rtl8723bs/hal/hal_com.c | 55 ------------------- drivers/staging/rtl8723bs/include/hal_com.h | 5 -- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 - drivers/staging/rtl8723bs/include/rtw_odm.h | 4 -- 6 files changed, 130 deletions(-)
Thanks, the entire series looks good to me:
for the series.
Regards,
Hans