lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202107260403.wQ3mf4xe-lkp@intel.com>
Date:   Mon, 26 Jul 2021 05:03:32 +0800
From:   kernel test robot <lkp@...el.com>
To:     Martin Kaiser <martin@...ser.cx>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-staging@...ts.linux.dev, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org, Martin Kaiser <martin@...ser.cx>
Subject: Re: [PATCH 14/18] staging: rtl8188eu: simplify
 rtl88eu_phy_iq_calibrate

Hi Martin,

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/Martin-Kaiser/staging-rtl8188eu-remove-unused-defines/20210726-000245
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f133717efc6f28052667daf682e99ffd4b3d7588
config: x86_64-randconfig-a005-20210725 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/fd8745a2293eb9616eb3ae4c2e231462a18bdbac
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Martin-Kaiser/staging-rtl8188eu-remove-unused-defines/20210726-000245
        git checkout fd8745a2293eb9616eb3ae4c2e231462a18bdbac
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/staging/rtl8188eu/hal/phy.c:1106:16: warning: variable 'pathbok' set but not used [-Wunused-but-set-variable]
           bool pathaok, pathbok;
                         ^
>> drivers/staging/rtl8188eu/hal/phy.c:1107:51: warning: variable 'reg_ec4' set but not used [-Wunused-but-set-variable]
           s32 reg_e94, reg_e9c, reg_ea4, reg_eb4, reg_ebc, reg_ec4;
                                                            ^
   2 warnings generated.
--
>> drivers/staging/rtl8188eu/hal/phy.c:1107:51: warning: variable 'reg_ec4' set but not used [-Wunused-but-set-variable]
           s32 reg_e94, reg_e9c, reg_ea4, reg_eb4, reg_ebc, reg_ec4;
                                                            ^
>> drivers/staging/rtl8188eu/hal/phy.c:1106:16: warning: variable 'pathbok' set but not used [-Wunused-but-set-variable]
           bool pathaok, pathbok;
                         ^
   2 warnings generated.


vim +/pathbok +1106 drivers/staging/rtl8188eu/hal/phy.c

d9124e064d27a5 navin patidar   2014-09-07  1100  
d9124e064d27a5 navin patidar   2014-09-07  1101  void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
d9124e064d27a5 navin patidar   2014-09-07  1102  {
177aa53a0d11b2 Ivan Safonov    2016-09-19  1103  	struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
d9124e064d27a5 navin patidar   2014-09-07  1104  	s32 result[4][8];
dee43f7ad325ec Michael Straube 2018-09-27  1105  	u8 i, final;
d9124e064d27a5 navin patidar   2014-09-07 @1106  	bool pathaok, pathbok;
9393d34e4905ff Sudip Mukherjee 2015-06-12 @1107  	s32 reg_e94, reg_e9c, reg_ea4, reg_eb4, reg_ebc, reg_ec4;
d9124e064d27a5 navin patidar   2014-09-07  1108  	bool is12simular, is13simular, is23simular;
d9124e064d27a5 navin patidar   2014-09-07  1109  	u32 iqk_bb_reg_92c[IQK_BB_REG_NUM] = {
d9124e064d27a5 navin patidar   2014-09-07  1110  		rOFDM0_XARxIQImbalance, rOFDM0_XBRxIQImbalance,
d9124e064d27a5 navin patidar   2014-09-07  1111  		rOFDM0_ECCAThreshold, rOFDM0_AGCRSSITable,
d9124e064d27a5 navin patidar   2014-09-07  1112  		rOFDM0_XATxIQImbalance, rOFDM0_XBTxIQImbalance,
d9124e064d27a5 navin patidar   2014-09-07  1113  		rOFDM0_XCTxAFE, rOFDM0_XDTxAFE,
d9124e064d27a5 navin patidar   2014-09-07  1114  		rOFDM0_RxIQExtAnta};
d9124e064d27a5 navin patidar   2014-09-07  1115  
d9124e064d27a5 navin patidar   2014-09-07  1116  	if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION))
d9124e064d27a5 navin patidar   2014-09-07  1117  		return;
d9124e064d27a5 navin patidar   2014-09-07  1118  
d9124e064d27a5 navin patidar   2014-09-07  1119  	if (recovery) {
d9124e064d27a5 navin patidar   2014-09-07  1120  		reload_adda_reg(adapt, iqk_bb_reg_92c,
d9124e064d27a5 navin patidar   2014-09-07  1121  				dm_odm->RFCalibrateInfo.IQK_BB_backup_recover, 9);
d9124e064d27a5 navin patidar   2014-09-07  1122  		return;
d9124e064d27a5 navin patidar   2014-09-07  1123  	}
d9124e064d27a5 navin patidar   2014-09-07  1124  
a793dbe926014e Michael Straube 2018-12-07  1125  	memset(result, 0, sizeof(result));
a793dbe926014e Michael Straube 2018-12-07  1126  	for (i = 0; i < 8; i += 2)
d9124e064d27a5 navin patidar   2014-09-07  1127  		result[3][i] = 0x100;
a793dbe926014e Michael Straube 2018-12-07  1128  
d9124e064d27a5 navin patidar   2014-09-07  1129  	final = 0xff;
d9124e064d27a5 navin patidar   2014-09-07  1130  	pathaok = false;
d9124e064d27a5 navin patidar   2014-09-07  1131  	pathbok = false;
d9124e064d27a5 navin patidar   2014-09-07  1132  	is12simular = false;
d9124e064d27a5 navin patidar   2014-09-07  1133  	is23simular = false;
d9124e064d27a5 navin patidar   2014-09-07  1134  	is13simular = false;
d9124e064d27a5 navin patidar   2014-09-07  1135  
d9124e064d27a5 navin patidar   2014-09-07  1136  	for (i = 0; i < 3; i++) {
fd8745a2293eb9 Martin Kaiser   2021-07-25  1137  		phy_iq_calibrate(adapt, result, i, false);
d9124e064d27a5 navin patidar   2014-09-07  1138  
d9124e064d27a5 navin patidar   2014-09-07  1139  		if (i == 1) {
d9124e064d27a5 navin patidar   2014-09-07  1140  			is12simular = simularity_compare(adapt, result, 0, 1);
d9124e064d27a5 navin patidar   2014-09-07  1141  			if (is12simular) {
d9124e064d27a5 navin patidar   2014-09-07  1142  				final = 0;
d9124e064d27a5 navin patidar   2014-09-07  1143  				break;
d9124e064d27a5 navin patidar   2014-09-07  1144  			}
d9124e064d27a5 navin patidar   2014-09-07  1145  		}
d9124e064d27a5 navin patidar   2014-09-07  1146  
d9124e064d27a5 navin patidar   2014-09-07  1147  		if (i == 2) {
d9124e064d27a5 navin patidar   2014-09-07  1148  			is13simular = simularity_compare(adapt, result, 0, 2);
d9124e064d27a5 navin patidar   2014-09-07  1149  			if (is13simular) {
d9124e064d27a5 navin patidar   2014-09-07  1150  				final = 0;
d9124e064d27a5 navin patidar   2014-09-07  1151  				break;
d9124e064d27a5 navin patidar   2014-09-07  1152  			}
d9124e064d27a5 navin patidar   2014-09-07  1153  			is23simular = simularity_compare(adapt, result, 1, 2);
d9124e064d27a5 navin patidar   2014-09-07  1154  			if (is23simular)
d9124e064d27a5 navin patidar   2014-09-07  1155  				final = 1;
d9124e064d27a5 navin patidar   2014-09-07  1156  			else
d9124e064d27a5 navin patidar   2014-09-07  1157  				final = 3;
d9124e064d27a5 navin patidar   2014-09-07  1158  		}
d9124e064d27a5 navin patidar   2014-09-07  1159  	}
d9124e064d27a5 navin patidar   2014-09-07  1160  
d9124e064d27a5 navin patidar   2014-09-07  1161  	for (i = 0; i < 4; i++) {
d9124e064d27a5 navin patidar   2014-09-07  1162  		reg_e94 = result[i][0];
d9124e064d27a5 navin patidar   2014-09-07  1163  		reg_e9c = result[i][1];
d9124e064d27a5 navin patidar   2014-09-07  1164  		reg_ea4 = result[i][2];
d9124e064d27a5 navin patidar   2014-09-07  1165  		reg_eb4 = result[i][4];
d9124e064d27a5 navin patidar   2014-09-07  1166  		reg_ebc = result[i][5];
d9124e064d27a5 navin patidar   2014-09-07  1167  		reg_ec4 = result[i][6];
d9124e064d27a5 navin patidar   2014-09-07  1168  	}
d9124e064d27a5 navin patidar   2014-09-07  1169  
d9124e064d27a5 navin patidar   2014-09-07  1170  	if (final != 0xff) {
d9124e064d27a5 navin patidar   2014-09-07  1171  		reg_e94 = result[final][0];
d9124e064d27a5 navin patidar   2014-09-07  1172  		reg_e9c = result[final][1];
d9124e064d27a5 navin patidar   2014-09-07  1173  		reg_ea4 = result[final][2];
d9124e064d27a5 navin patidar   2014-09-07  1174  		reg_eb4 = result[final][4];
d9124e064d27a5 navin patidar   2014-09-07  1175  		reg_ebc = result[final][5];
d9124e064d27a5 navin patidar   2014-09-07  1176  		dm_odm->RFCalibrateInfo.RegE94 = reg_e94;
d9124e064d27a5 navin patidar   2014-09-07  1177  		dm_odm->RFCalibrateInfo.RegE9C = reg_e9c;
d9124e064d27a5 navin patidar   2014-09-07  1178  		dm_odm->RFCalibrateInfo.RegEB4 = reg_eb4;
d9124e064d27a5 navin patidar   2014-09-07  1179  		dm_odm->RFCalibrateInfo.RegEBC = reg_ebc;
d9124e064d27a5 navin patidar   2014-09-07  1180  		reg_ec4 = result[final][6];
d9124e064d27a5 navin patidar   2014-09-07  1181  		pathaok = true;
d9124e064d27a5 navin patidar   2014-09-07  1182  		pathbok = true;
d9124e064d27a5 navin patidar   2014-09-07  1183  	} else {
d9124e064d27a5 navin patidar   2014-09-07  1184  		dm_odm->RFCalibrateInfo.RegE94 = 0x100;
d9124e064d27a5 navin patidar   2014-09-07  1185  		dm_odm->RFCalibrateInfo.RegEB4 = 0x100;
d9124e064d27a5 navin patidar   2014-09-07  1186  		dm_odm->RFCalibrateInfo.RegE9C = 0x0;
d9124e064d27a5 navin patidar   2014-09-07  1187  		dm_odm->RFCalibrateInfo.RegEBC = 0x0;
d9124e064d27a5 navin patidar   2014-09-07  1188  	}
d9124e064d27a5 navin patidar   2014-09-07  1189  	if (reg_e94 != 0)
d9124e064d27a5 navin patidar   2014-09-07  1190  		patha_fill_iqk(adapt, pathaok, result, final,
d9124e064d27a5 navin patidar   2014-09-07  1191  			       (reg_ea4 == 0));
d9124e064d27a5 navin patidar   2014-09-07  1192  
d9124e064d27a5 navin patidar   2014-09-07  1193  	if (final < 4) {
d9124e064d27a5 navin patidar   2014-09-07  1194  		for (i = 0; i < IQK_Matrix_REG_NUM; i++)
dee43f7ad325ec Michael Straube 2018-09-27  1195  			dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][i] = result[final][i];
dee43f7ad325ec Michael Straube 2018-09-27  1196  		dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].bIQKDone = true;
d9124e064d27a5 navin patidar   2014-09-07  1197  	}
d9124e064d27a5 navin patidar   2014-09-07  1198  
d9124e064d27a5 navin patidar   2014-09-07  1199  	save_adda_registers(adapt, iqk_bb_reg_92c,
d9124e064d27a5 navin patidar   2014-09-07  1200  			    dm_odm->RFCalibrateInfo.IQK_BB_backup_recover, 9);
d9124e064d27a5 navin patidar   2014-09-07  1201  }
d9124e064d27a5 navin patidar   2014-09-07  1202  

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

Download attachment ".config.gz" of type "application/gzip" (36915 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ