linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: hal: Remove two set but unused variables
@ 2021-05-12  8:26 Fabio M. De Francesco
  2021-05-12 10:35 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio M. De Francesco @ 2021-05-12  8:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman, open list:STAGING SUBSYSTEM, open list
  Cc: Fabio M. De Francesco

Removed two set but unused variables. Issue detected by GCC.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
index c42fd36c88ef..3b8be8137683 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
@@ -1629,7 +1629,7 @@ void PHY_IQCalibrate_8723B(
 	s32 result[4][8];	/* last is final result */
 	u8 i, final_candidate;
 	bool bPathAOK, bPathBOK;
-	s32 RegE94, RegE9C, RegEA4, RegEAC, RegEB4, RegEBC, RegEC4, RegECC, RegTmp = 0;
+	s32 RegE94, RegE9C, RegEA4, RegEB4, RegEBC, RegEC4, RegTmp = 0;
 	bool is12simular, is13simular, is23simular;
 	bool bSingleTone = false, bCarrierSuppression = false;
 	u32 IQK_BB_REG_92C[IQK_BB_REG_NUM] = {
@@ -1646,7 +1646,6 @@ void PHY_IQCalibrate_8723B(
 /* 	u32 		Path_SEL_BB = 0; */
 	u32 		GNT_BT_default;
 	u32 		StartTime;
-	s32			ProgressingTime;
 
 	if (!ODM_CheckPowerStatus(padapter))
 		return;
@@ -1777,22 +1776,18 @@ void PHY_IQCalibrate_8723B(
 		RegE94 = result[i][0];
 		RegE9C = result[i][1];
 		RegEA4 = result[i][2];
-		RegEAC = result[i][3];
 		RegEB4 = result[i][4];
 		RegEBC = result[i][5];
 		RegEC4 = result[i][6];
-		RegECC = result[i][7];
 	}
 
 	if (final_candidate != 0xff) {
 		pDM_Odm->RFCalibrateInfo.RegE94 = RegE94 = result[final_candidate][0];
 		pDM_Odm->RFCalibrateInfo.RegE9C = RegE9C = result[final_candidate][1];
 		RegEA4 = result[final_candidate][2];
-		RegEAC = result[final_candidate][3];
 		pDM_Odm->RFCalibrateInfo.RegEB4 = RegEB4 = result[final_candidate][4];
 		pDM_Odm->RFCalibrateInfo.RegEBC = RegEBC = result[final_candidate][5];
 		RegEC4 = result[final_candidate][6];
-		RegECC = result[final_candidate][7];
 		bPathAOK = bPathBOK = true;
 	} else {
 		pDM_Odm->RFCalibrateInfo.RegE94 = pDM_Odm->RFCalibrateInfo.RegEB4 = 0x100;	/* X default value */
@@ -1844,10 +1839,6 @@ void PHY_IQCalibrate_8723B(
 	}
 
 	pDM_Odm->RFCalibrateInfo.bIQKInProgress = false;
-
-	ProgressingTime = jiffies_to_msecs(jiffies - StartTime);
-
-
 }
 
 
@@ -1856,7 +1847,6 @@ void PHY_LCCalibrate_8723B(struct dm_odm_t *pDM_Odm)
 	bool		bSingleTone = false, bCarrierSuppression = false;
 	u32 		timeout = 2000, timecount = 0;
 	u32 		StartTime;
-	s32			ProgressingTime;
 
 #if DISABLE_BB_RF
 	return;
@@ -1882,6 +1872,4 @@ void PHY_LCCalibrate_8723B(struct dm_odm_t *pDM_Odm)
 
 
 	pDM_Odm->RFCalibrateInfo.bLCKInProgress = false;
-
-	ProgressingTime = jiffies_to_msecs(jiffies - StartTime);
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: hal: Remove two set but unused variables
  2021-05-12  8:26 [PATCH] staging: rtl8723bs: hal: Remove two set but unused variables Fabio M. De Francesco
@ 2021-05-12 10:35 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-05-12 10:35 UTC (permalink / raw)
  To: Fabio M. De Francesco, Greg Kroah-Hartman, linux-staging, linux-kernel
  Cc: kbuild-all, Fabio M. De Francesco

[-- Attachment #1: Type: text/plain, Size: 5881 bytes --]

Hi "Fabio,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Fabio-M-De-Francesco/staging-rtl8723bs-hal-Remove-two-set-but-unused-variables/20210512-162828
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f6d5d118462de2797f5925e04b826f00c66f6325
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1a4e324a51c22525507e749a8826064554e7ad9f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Fabio-M-De-Francesco/staging-rtl8723bs-hal-Remove-two-set-but-unused-variables/20210512-162828
        git checkout 1a4e324a51c22525507e749a8826064554e7ad9f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c: In function 'PHY_IQCalibrate_8723B':
>> drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c:1648:8: warning: variable 'StartTime' set but not used [-Wunused-but-set-variable]
    1648 |  u32   StartTime;
         |        ^~~~~~~~~
   drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c: In function 'PHY_LCCalibrate_8723B':
   drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c:1849:8: warning: variable 'StartTime' set but not used [-Wunused-but-set-variable]
    1849 |  u32   StartTime;
         |        ^~~~~~~~~


vim +/StartTime +1648 drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c

554c0a3abf216c Hans de Goede         2017-03-29  1612  
554c0a3abf216c Hans de Goede         2017-03-29  1613  
554c0a3abf216c Hans de Goede         2017-03-29  1614  
554c0a3abf216c Hans de Goede         2017-03-29  1615  /* IQK version:V2.5    20140123 */
554c0a3abf216c Hans de Goede         2017-03-29  1616  /* IQK is controlled by Is2ant, RF path */
554c0a3abf216c Hans de Goede         2017-03-29  1617  void PHY_IQCalibrate_8723B(
554c0a3abf216c Hans de Goede         2017-03-29  1618  	struct adapter *padapter,
554c0a3abf216c Hans de Goede         2017-03-29  1619  	bool bReCovery,
554c0a3abf216c Hans de Goede         2017-03-29  1620  	bool bRestore,
554c0a3abf216c Hans de Goede         2017-03-29  1621  	bool Is2ant,	/* false:1ant, true:2-ant */
554c0a3abf216c Hans de Goede         2017-03-29  1622  	u8 RF_Path	/* 0:S1, 1:S0 */
554c0a3abf216c Hans de Goede         2017-03-29  1623  )
554c0a3abf216c Hans de Goede         2017-03-29  1624  {
554c0a3abf216c Hans de Goede         2017-03-29  1625  	struct hal_com_data	*pHalData = GET_HAL_DATA(padapter);
554c0a3abf216c Hans de Goede         2017-03-29  1626  
f8010da6556d5c Marco Cesati          2021-03-17  1627  	struct dm_odm_t *pDM_Odm = &pHalData->odmpriv;
554c0a3abf216c Hans de Goede         2017-03-29  1628  
554c0a3abf216c Hans de Goede         2017-03-29  1629  	s32 result[4][8];	/* last is final result */
98ab51df76bf4a Michael Straube       2020-01-10  1630  	u8 i, final_candidate;
554c0a3abf216c Hans de Goede         2017-03-29  1631  	bool bPathAOK, bPathBOK;
1a4e324a51c225 Fabio M. De Francesco 2021-05-12  1632  	s32 RegE94, RegE9C, RegEA4, RegEB4, RegEBC, RegEC4, RegTmp = 0;
554c0a3abf216c Hans de Goede         2017-03-29  1633  	bool is12simular, is13simular, is23simular;
554c0a3abf216c Hans de Goede         2017-03-29  1634  	bool bSingleTone = false, bCarrierSuppression = false;
554c0a3abf216c Hans de Goede         2017-03-29  1635  	u32 IQK_BB_REG_92C[IQK_BB_REG_NUM] = {
554c0a3abf216c Hans de Goede         2017-03-29  1636  		rOFDM0_XARxIQImbalance,
554c0a3abf216c Hans de Goede         2017-03-29  1637  		rOFDM0_XBRxIQImbalance,
554c0a3abf216c Hans de Goede         2017-03-29  1638  		rOFDM0_ECCAThreshold,
554c0a3abf216c Hans de Goede         2017-03-29  1639  		rOFDM0_AGCRSSITable,
554c0a3abf216c Hans de Goede         2017-03-29  1640  		rOFDM0_XATxIQImbalance,
554c0a3abf216c Hans de Goede         2017-03-29  1641  		rOFDM0_XBTxIQImbalance,
554c0a3abf216c Hans de Goede         2017-03-29  1642  		rOFDM0_XCTxAFE,
554c0a3abf216c Hans de Goede         2017-03-29  1643  		rOFDM0_XDTxAFE,
554c0a3abf216c Hans de Goede         2017-03-29  1644  		rOFDM0_RxIQExtAnta
554c0a3abf216c Hans de Goede         2017-03-29  1645  	};
554c0a3abf216c Hans de Goede         2017-03-29  1646  /* 	u32 		Path_SEL_BB = 0; */
554c0a3abf216c Hans de Goede         2017-03-29  1647  	u32 		GNT_BT_default;
554c0a3abf216c Hans de Goede         2017-03-29 @1648  	u32 		StartTime;
554c0a3abf216c Hans de Goede         2017-03-29  1649  
941add8e3e63a4 Puranjay Mohan        2019-05-16  1650  	if (!ODM_CheckPowerStatus(padapter))
554c0a3abf216c Hans de Goede         2017-03-29  1651  		return;
554c0a3abf216c Hans de Goede         2017-03-29  1652  
554c0a3abf216c Hans de Goede         2017-03-29  1653  	if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION))
554c0a3abf216c Hans de Goede         2017-03-29  1654  		return;
554c0a3abf216c Hans de Goede         2017-03-29  1655  
554c0a3abf216c Hans de Goede         2017-03-29  1656  	/*  20120213<Kordan> Turn on when continuous Tx to pass lab testing. (required by Edlu) */
554c0a3abf216c Hans de Goede         2017-03-29  1657  	if (bSingleTone || bCarrierSuppression)
554c0a3abf216c Hans de Goede         2017-03-29  1658  		return;
554c0a3abf216c Hans de Goede         2017-03-29  1659  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73393 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-12 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  8:26 [PATCH] staging: rtl8723bs: hal: Remove two set but unused variables Fabio M. De Francesco
2021-05-12 10:35 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).