Hi Jacob, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/intel-lab-lkp/linux/commits/Jacob-Bai/staging-rtl8192e-trivial-code-cleanup-patches/20221110-183704 patch link: https://lore.kernel.org/r/354847ce7b2f9ea4dc549bf13656192c1db7c231.1668075486.git.jacob.bai.au%40gmail.com patch subject: [PATCH v5 2/2] staging: rtl8192e: replace macro defines with variables config: ia64-allmodconfig compiler: ia64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/804af0545f19f5e713da7263f96da7e9268054a9 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jacob-Bai/staging-rtl8192e-trivial-code-cleanup-patches/20221110-183704 git checkout 804af0545f19f5e713da7263f96da7e9268054a9 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/rtl8192e/rtl8192e/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c: In function 'rtl92e_config_mac': >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:310:30: error: 'MACPHY_Array_PGLength' undeclared (first use in this function) 310 | dwArrayLen = MACPHY_Array_PGLength; | ^~~~~~~~~~~~~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:310:30: note: each undeclared identifier is reported only once for each function it appears in >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:311:28: error: 'Rtl819XMACPHY_Array_PG' undeclared (first use in this function) 311 | pdwArray = Rtl819XMACPHY_Array_PG; | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:314:30: error: 'MACPHY_ArrayLength' undeclared (first use in this function) 314 | dwArrayLen = MACPHY_ArrayLength; | ^~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:315:28: error: 'Rtl819XMACPHY_Array' undeclared (first use in this function); did you mean 'rtl819XAGCTAB_Array'? 315 | pdwArray = Rtl819XMACPHY_Array; | ^~~~~~~~~~~~~~~~~~~ | rtl819XAGCTAB_Array drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c: In function '_rtl92e_phy_config_bb': >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:335:27: error: 'AGCTAB_ArrayLength' undeclared (first use in this function); did you mean 'AGCTAB_ArrayLen'? 335 | AGCTAB_ArrayLen = AGCTAB_ArrayLength; | ^~~~~~~~~~~~~~~~~~ | AGCTAB_ArrayLen >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:336:37: error: 'Rtl819XAGCTAB_Array' undeclared (first use in this function); did you mean 'rtl819XAGCTAB_Array'? 336 | Rtl819XAGCTAB_Array_Table = Rtl819XAGCTAB_Array; | ^~~~~~~~~~~~~~~~~~~ | rtl819XAGCTAB_Array >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:338:35: error: 'PHY_REGArrayLength' undeclared (first use in this function); did you mean 'PHY_REGArrayLen'? 338 | PHY_REGArrayLen = PHY_REGArrayLength; | ^~~~~~~~~~~~~~~~~~ | PHY_REGArrayLen >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:339:45: error: 'Rtl819XPHY_REGArray' undeclared (first use in this function); did you mean 'Rtl819XPHY_REGArray_Table'? 339 | Rtl819XPHY_REGArray_Table = Rtl819XPHY_REGArray; | ^~~~~~~~~~~~~~~~~~~ | Rtl819XPHY_REGArray_Table >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:341:35: error: 'PHY_REG_1T2RArrayLength' undeclared (first use in this function); did you mean 'PHY_REGArrayLen'? 341 | PHY_REGArrayLen = PHY_REG_1T2RArrayLength; | ^~~~~~~~~~~~~~~~~~~~~~~ | PHY_REGArrayLen >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:342:45: error: 'Rtl819XPHY_REG_1T2RArray' undeclared (first use in this function); did you mean 'RTL8192E_PHY_REG_1T2R_ARRAY'? 342 | Rtl819XPHY_REGArray_Table = Rtl819XPHY_REG_1T2RArray; | ^~~~~~~~~~~~~~~~~~~~~~~~ | RTL8192E_PHY_REG_1T2R_ARRAY drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c: In function 'rtl92e_config_rf_path': >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:671:33: error: 'RadioA_ArrayLength' undeclared (first use in this function) 671 | for (i = 0; i < RadioA_ArrayLength; i += 2) { | ^~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:672:29: error: 'Rtl819XRadioA_Array' undeclared (first use in this function); did you mean 'rtl819XAGCTAB_Array'? 672 | if (Rtl819XRadioA_Array[i] == 0xfe) { | ^~~~~~~~~~~~~~~~~~~ | rtl819XAGCTAB_Array >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:683:33: error: 'RadioB_ArrayLength' undeclared (first use in this function) 683 | for (i = 0; i < RadioB_ArrayLength; i += 2) { | ^~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:684:29: error: 'Rtl819XRadioB_Array' undeclared (first use in this function); did you mean 'rtl819XAGCTAB_Array'? 684 | if (Rtl819XRadioB_Array[i] == 0xfe) { | ^~~~~~~~~~~~~~~~~~~ | rtl819XAGCTAB_Array >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:695:33: error: 'RadioC_ArrayLength' undeclared (first use in this function) 695 | for (i = 0; i < RadioC_ArrayLength; i += 2) { | ^~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:696:29: error: 'Rtl819XRadioC_Array' undeclared (first use in this function) 696 | if (Rtl819XRadioC_Array[i] == 0xfe) { | ^~~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:707:33: error: 'RadioD_ArrayLength' undeclared (first use in this function) 707 | for (i = 0; i < RadioD_ArrayLength; i += 2) { | ^~~~~~~~~~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c:708:29: error: 'Rtl819XRadioD_Array' undeclared (first use in this function) 708 | if (Rtl819XRadioD_Array[i] == 0xfe) { | ^~~~~~~~~~~~~~~~~~~ -- >> drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:10:34: error: implicit declaration of function 'ARRAY_SIZE' [-Werror=implicit-function-declaration] 10 | u32 RTL8192E_PHY_REG_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_ARRAY); | ^~~~~~~~~~ >> drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:10:34: error: initializer element is not constant drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:162:39: error: initializer element is not constant 162 | u32 RTL8192E_PHY_REG_1T2R_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_1T2R_ARRAY); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:289:33: error: initializer element is not constant 289 | u32 RTL8192E_RADIOA_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOA_ARRAY); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:332:33: error: initializer element is not constant 332 | u32 RTL8192E_RADIOB_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOB_ARRAY); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:336:33: error: initializer element is not constant 336 | u32 RTL8192E_RADIOC_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOC_ARRAY); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:340:33: error: initializer element is not constant 340 | u32 RTL8192E_RADIOD_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOD_ARRAY); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:350:30: error: initializer element is not constant 350 | u32 RTL8192E_MAC_ARRAY_LEN = ARRAY_SIZE(RTL8192E_MAC_ARRAY); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:364:33: error: initializer element is not constant 364 | u32 RTL8192E_MAC_ARRAY_PG_LEN = ARRAY_SIZE(RTL8192E_MAC_ARRAY_PG); | ^~~~~~~~~~ drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c:560:34: error: initializer element is not constant 560 | u32 RTL8192E_AGC_TAB_ARRAY_LEN = ARRAY_SIZE(RTL8192E_AGC_TAB_ARRAY); | ^~~~~~~~~~ cc1: some warnings being treated as errors vim +/MACPHY_Array_PGLength +310 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 301 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 302 0efe7104ea2a1e drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c Mateusz Kulikowski 2015-07-19 303 void rtl92e_config_mac(struct net_device *dev) 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 304 { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 305 u32 dwArrayLen = 0, i = 0; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 306 u32 *pdwArray = NULL; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 307 struct r8192_priv *priv = rtllib_priv(dev); 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 308 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 309 if (priv->bTXPowerDataReadFromEEPORM) { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @310 dwArrayLen = MACPHY_Array_PGLength; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @311 pdwArray = Rtl819XMACPHY_Array_PG; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 312 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 313 } else { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @314 dwArrayLen = MACPHY_ArrayLength; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @315 pdwArray = Rtl819XMACPHY_Array; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 316 } 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 317 for (i = 0; i < dwArrayLen; i += 3) { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 318 if (pdwArray[i] == 0x318) 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 319 pdwArray[i+2] = 0x00000800; 153f9ddbe97828 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c Mateusz Kulikowski 2015-07-19 320 rtl92e_set_bb_reg(dev, pdwArray[i], pdwArray[i+1], 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 321 pdwArray[i+2]); 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 322 } 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 323 return; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 324 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 325 } 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 326 a059e47206d7f7 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c Mateusz Kulikowski 2015-09-20 327 static void _rtl92e_phy_config_bb(struct net_device *dev, u8 ConfigType) 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 328 { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 329 int i; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 330 u32 *Rtl819XPHY_REGArray_Table = NULL; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 331 u32 *Rtl819XAGCTAB_Array_Table = NULL; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 332 u16 AGCTAB_ArrayLen, PHY_REGArrayLen = 0; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 333 struct r8192_priv *priv = rtllib_priv(dev); 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 334 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @335 AGCTAB_ArrayLen = AGCTAB_ArrayLength; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @336 Rtl819XAGCTAB_Array_Table = Rtl819XAGCTAB_Array; 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 337 if (priv->rf_type == RF_2T4R) { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @338 PHY_REGArrayLen = PHY_REGArrayLength; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @339 Rtl819XPHY_REGArray_Table = Rtl819XPHY_REGArray; 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 340 } else if (priv->rf_type == RF_1T2R) { 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @341 PHY_REGArrayLen = PHY_REG_1T2RArrayLength; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 @342 Rtl819XPHY_REGArray_Table = Rtl819XPHY_REG_1T2RArray; 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 343 } 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 344 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 345 if (ConfigType == BaseBand_Config_PHY_REG) { 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 346 for (i = 0; i < PHY_REGArrayLen; i += 2) { 153f9ddbe97828 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c Mateusz Kulikowski 2015-07-19 347 rtl92e_set_bb_reg(dev, Rtl819XPHY_REGArray_Table[i], 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 348 bMaskDWord, 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 349 Rtl819XPHY_REGArray_Table[i+1]); 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 350 } 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 351 } else if (ConfigType == BaseBand_Config_AGC_TAB) { 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 352 for (i = 0; i < AGCTAB_ArrayLen; i += 2) { 153f9ddbe97828 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c Mateusz Kulikowski 2015-07-19 353 rtl92e_set_bb_reg(dev, Rtl819XAGCTAB_Array_Table[i], 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 354 bMaskDWord, 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 355 Rtl819XAGCTAB_Array_Table[i+1]); 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 356 } 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 357 } 94a799425eee82 drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-23 358 } 547d0c34b71b1c drivers/staging/rtl8192e/r8192E_phy.c Larry Finger 2011-08-25 359 -- 0-DAY CI Kernel Test Service https://01.org/lkp