Skip to contentSkip to conversation

staging: rtl8723bs: remove reduntant functions

PATCH In review Bera Yüzlü 4 participants 5 messages Mar 21 – Mar 24 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: remove reduntant functions

GetU1ByteIntegerFromStringInDecimal() is a copy of kstrtou8(). But its only called by PHY_SetTxPowerLimit() which is only called by odm_ConfigBB_TXPWR_LMT_8723B() which is only called by ODM_ReadAndConfig_MP_8723B_TXPWR_LMT().
But ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() didn't called anywhere so removed:
GetU1ByteIntegerFromStringInDecimal() PHY_SetTxPowerLimit()
odm_ConfigBB_TXPWR_LMT_8723B() ODM_ReadAndConfig_MP_8723B_TXPWR_LMT()

---
V2: Removed others
V1: Removed only GetU1ByteIntegerFromStringInDecimal()
V1 link: https://lore.kernel.org/linux-staging/[email protected]/T/#u

 .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c  | 200 ------------------
 drivers/staging/rtl8723bs/hal/hal_com.c       |  19 --
 .../staging/rtl8723bs/hal/hal_com_phycfg.c    |  53 -----
 .../rtl8723bs/hal/odm_RegConfig8723B.c        |  21 --
 .../rtl8723bs/hal/odm_RegConfig8723B.h        |   9 -
 drivers/staging/rtl8723bs/include/hal_com.h   |   2 -
 .../rtl8723bs/include/hal_com_phycfg.h        |   3 -
 7 files changed, 307 deletions(-)
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c +0 -200
index 0c7d0307b822..0fb1751970d9 100644
@@ -353,203 +353,3 @@ void ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct dm_odm_t *pDM_Odm)
 		DELTA_SWINGIDX_SIZE
 	);
 }
-
-/******************************************************************************
- *                           TXPWR_LMT.TXT
- ******************************************************************************/
-
-static u8 *Array_MP_8723B_TXPWR_LMT[] = {
-	"FCC", "20M", "CCK", "1T", "01", "32",
-	"ETSI", "20M", "CCK", "1T", "01", "32",
-	"MKK", "20M", "CCK", "1T", "01", "32",
-	"FCC", "20M", "CCK", "1T", "02", "32",
-	"ETSI", "20M", "CCK", "1T", "02", "32",
-	"MKK", "20M", "CCK", "1T", "02", "32",
-	"FCC", "20M", "CCK", "1T", "03", "32",
-	"ETSI", "20M", "CCK", "1T", "03", "32",
-	"MKK", "20M", "CCK", "1T", "03", "32",
-	"FCC", "20M", "CCK", "1T", "04", "32",
-	"ETSI", "20M", "CCK", "1T", "04", "32",
-	"MKK", "20M", "CCK", "1T", "04", "32",
-	"FCC", "20M", "CCK", "1T", "05", "32",
-	"ETSI", "20M", "CCK", "1T", "05", "32",
-	"MKK", "20M", "CCK", "1T", "05", "32",
-	"FCC", "20M", "CCK", "1T", "06", "32",
-	"ETSI", "20M", "CCK", "1T", "06", "32",
-	"MKK", "20M", "CCK", "1T", "06", "32",
-	"FCC", "20M", "CCK", "1T", "07", "32",
-	"ETSI", "20M", "CCK", "1T", "07", "32",
-	"MKK", "20M", "CCK", "1T", "07", "32",
-	"FCC", "20M", "CCK", "1T", "08", "32",
-	"ETSI", "20M", "CCK", "1T", "08", "32",
-	"MKK", "20M", "CCK", "1T", "08", "32",
-	"FCC", "20M", "CCK", "1T", "09", "32",
-	"ETSI", "20M", "CCK", "1T", "09", "32",
-	"MKK", "20M", "CCK", "1T", "09", "32",
-	"FCC", "20M", "CCK", "1T", "10", "32",
-	"ETSI", "20M", "CCK", "1T", "10", "32",
-	"MKK", "20M", "CCK", "1T", "10", "32",
-	"FCC", "20M", "CCK", "1T", "11", "32",
-	"ETSI", "20M", "CCK", "1T", "11", "32",
-	"MKK", "20M", "CCK", "1T", "11", "32",
-	"FCC", "20M", "CCK", "1T", "12", "63",
-	"ETSI", "20M", "CCK", "1T", "12", "32",
-	"MKK", "20M", "CCK", "1T", "12", "32",
-	"FCC", "20M", "CCK", "1T", "13", "63",
-	"ETSI", "20M", "CCK", "1T", "13", "32",
-	"MKK", "20M", "CCK", "1T", "13", "32",
-	"FCC", "20M", "CCK", "1T", "14", "63",
-	"ETSI", "20M", "CCK", "1T", "14", "63",
-	"MKK", "20M", "CCK", "1T", "14", "32",
-	"FCC", "20M", "OFDM", "1T", "01", "28",
-	"ETSI", "20M", "OFDM", "1T", "01", "32",
-	"MKK", "20M", "OFDM", "1T", "01", "32",
-	"FCC", "20M", "OFDM", "1T", "02", "28",
-	"ETSI", "20M", "OFDM", "1T", "02", "32",
-	"MKK", "20M", "OFDM", "1T", "02", "32",
-	"FCC", "20M", "OFDM", "1T", "03", "32",
-	"ETSI", "20M", "OFDM", "1T", "03", "32",
-	"MKK", "20M", "OFDM", "1T", "03", "32",
-	"FCC", "20M", "OFDM", "1T", "04", "32",
-	"ETSI", "20M", "OFDM", "1T", "04", "32",
-	"MKK", "20M", "OFDM", "1T", "04", "32",
-	"FCC", "20M", "OFDM", "1T", "05", "32",
-	"ETSI", "20M", "OFDM", "1T", "05", "32",
-	"MKK", "20M", "OFDM", "1T", "05", "32",
-	"FCC", "20M", "OFDM", "1T", "06", "32",
-	"ETSI", "20M", "OFDM", "1T", "06", "32",
-	"MKK", "20M", "OFDM", "1T", "06", "32",
-	"FCC", "20M", "OFDM", "1T", "07", "32",
-	"ETSI", "20M", "OFDM", "1T", "07", "32",
-	"MKK", "20M", "OFDM", "1T", "07", "32",
-	"FCC", "20M", "OFDM", "1T", "08", "32",
-	"ETSI", "20M", "OFDM", "1T", "08", "32",
-	"MKK", "20M", "OFDM", "1T", "08", "32",
-	"FCC", "20M", "OFDM", "1T", "09", "32",
-	"ETSI", "20M", "OFDM", "1T", "09", "32",
-	"MKK", "20M", "OFDM", "1T", "09", "32",
-	"FCC", "20M", "OFDM", "1T", "10", "28",
-	"ETSI", "20M", "OFDM", "1T", "10", "32",
-	"MKK", "20M", "OFDM", "1T", "10", "32",
-	"FCC", "20M", "OFDM", "1T", "11", "28",
-	"ETSI", "20M", "OFDM", "1T", "11", "32",
-	"MKK", "20M", "OFDM", "1T", "11", "32",
-	"FCC", "20M", "OFDM", "1T", "12", "63",
-	"ETSI", "20M", "OFDM", "1T", "12", "32",
-	"MKK", "20M", "OFDM", "1T", "12", "32",
-	"FCC", "20M", "OFDM", "1T", "13", "63",
-	"ETSI", "20M", "OFDM", "1T", "13", "32",
-	"MKK", "20M", "OFDM", "1T", "13", "32",
-	"FCC", "20M", "OFDM", "1T", "14", "63",
-	"ETSI", "20M", "OFDM", "1T", "14", "63",
-	"MKK", "20M", "OFDM", "1T", "14", "63",
-	"FCC", "20M", "HT", "1T", "01", "26",
-	"ETSI", "20M", "HT", "1T", "01", "32",
-	"MKK", "20M", "HT", "1T", "01", "32",
-	"FCC", "20M", "HT", "1T", "02", "26",
-	"ETSI", "20M", "HT", "1T", "02", "32",
-	"MKK", "20M", "HT", "1T", "02", "32",
-	"FCC", "20M", "HT", "1T", "03", "32",
-	"ETSI", "20M", "HT", "1T", "03", "32",
-	"MKK", "20M", "HT", "1T", "03", "32",
-	"FCC", "20M", "HT", "1T", "04", "32",
-	"ETSI", "20M", "HT", "1T", "04", "32",
-	"MKK", "20M", "HT", "1T", "04", "32",
-	"FCC", "20M", "HT", "1T", "05", "32",
-	"ETSI", "20M", "HT", "1T", "05", "32",
-	"MKK", "20M", "HT", "1T", "05", "32",
-	"FCC", "20M", "HT", "1T", "06", "32",
-	"ETSI", "20M", "HT", "1T", "06", "32",
-	"MKK", "20M", "HT", "1T", "06", "32",
-	"FCC", "20M", "HT", "1T", "07", "32",
-	"ETSI", "20M", "HT", "1T", "07", "32",
-	"MKK", "20M", "HT", "1T", "07", "32",
-	"FCC", "20M", "HT", "1T", "08", "32",
-	"ETSI", "20M", "HT", "1T", "08", "32",
-	"MKK", "20M", "HT", "1T", "08", "32",
-	"FCC", "20M", "HT", "1T", "09", "32",
-	"ETSI", "20M", "HT", "1T", "09", "32",
-	"MKK", "20M", "HT", "1T", "09", "32",
-	"FCC", "20M", "HT", "1T", "10", "26",
-	"ETSI", "20M", "HT", "1T", "10", "32",
-	"MKK", "20M", "HT", "1T", "10", "32",
-	"FCC", "20M", "HT", "1T", "11", "26",
-	"ETSI", "20M", "HT", "1T", "11", "32",
-	"MKK", "20M", "HT", "1T", "11", "32",
-	"FCC", "20M", "HT", "1T", "12", "63",
-	"ETSI", "20M", "HT", "1T", "12", "32",
-	"MKK", "20M", "HT", "1T", "12", "32",
-	"FCC", "20M", "HT", "1T", "13", "63",
-	"ETSI", "20M", "HT", "1T", "13", "32",
-	"MKK", "20M", "HT", "1T", "13", "32",
-	"FCC", "20M", "HT", "1T", "14", "63",
-	"ETSI", "20M", "HT", "1T", "14", "63",
-	"MKK", "20M", "HT", "1T", "14", "63",
-	"FCC", "40M", "HT", "1T", "01", "63",
-	"ETSI", "40M", "HT", "1T", "01", "63",
-	"MKK", "40M", "HT", "1T", "01", "63",
-	"FCC", "40M", "HT", "1T", "02", "63",
-	"ETSI", "40M", "HT", "1T", "02", "63",
-	"MKK", "40M", "HT", "1T", "02", "63",
-	"FCC", "40M", "HT", "1T", "03", "26",
-	"ETSI", "40M", "HT", "1T", "03", "32",
-	"MKK", "40M", "HT", "1T", "03", "32",
-	"FCC", "40M", "HT", "1T", "04", "26",
-	"ETSI", "40M", "HT", "1T", "04", "32",
-	"MKK", "40M", "HT", "1T", "04", "32",
-	"FCC", "40M", "HT", "1T", "05", "32",
-	"ETSI", "40M", "HT", "1T", "05", "32",
-	"MKK", "40M", "HT", "1T", "05", "32",
-	"FCC", "40M", "HT", "1T", "06", "32",
-	"ETSI", "40M", "HT", "1T", "06", "32",
-	"MKK", "40M", "HT", "1T", "06", "32",
-	"FCC", "40M", "HT", "1T", "07", "32",
-	"ETSI", "40M", "HT", "1T", "07", "32",
-	"MKK", "40M", "HT", "1T", "07", "32",
-	"FCC", "40M", "HT", "1T", "08", "26",
-	"ETSI", "40M", "HT", "1T", "08", "32",
-	"MKK", "40M", "HT", "1T", "08", "32",
-	"FCC", "40M", "HT", "1T", "09", "26",
-	"ETSI", "40M", "HT", "1T", "09", "32",
-	"MKK", "40M", "HT", "1T", "09", "32",
-	"FCC", "40M", "HT", "1T", "10", "26",
-	"ETSI", "40M", "HT", "1T", "10", "32",
-	"MKK", "40M", "HT", "1T", "10", "32",
-	"FCC", "40M", "HT", "1T", "11", "26",
-	"ETSI", "40M", "HT", "1T", "11", "32",
-	"MKK", "40M", "HT", "1T", "11", "32",
-	"FCC", "40M", "HT", "1T", "12", "63",
-	"ETSI", "40M", "HT", "1T", "12", "32",
-	"MKK", "40M", "HT", "1T", "12", "32",
-	"FCC", "40M", "HT", "1T", "13", "63",
-	"ETSI", "40M", "HT", "1T", "13", "32",
-	"MKK", "40M", "HT", "1T", "13", "32",
-	"FCC", "40M", "HT", "1T", "14", "63",
-	"ETSI", "40M", "HT", "1T", "14", "63",
-	"MKK", "40M", "HT", "1T", "14", "63"
-};
-
-void ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(struct dm_odm_t *pDM_Odm)
-{
-	u32 i = 0;
-	u8 **Array = Array_MP_8723B_TXPWR_LMT;
-
-	for (i = 0; i < ARRAY_SIZE(Array_MP_8723B_TXPWR_LMT); i += 6) {
-		u8 *regulation = Array[i];
-		u8 *bandwidth = Array[i+1];
-		u8 *rate = Array[i+2];
-		u8 *rfPath = Array[i+3];
-		u8 *chnl = Array[i+4];
-		u8 *val = Array[i+5];
-
-		odm_ConfigBB_TXPWR_LMT_8723B(
-			pDM_Odm,
-			regulation,
-			bandwidth,
-			rate,
-			rfPath,
-			chnl,
-			val
-		);
-	}
-}
drivers/staging/rtl8723bs/hal/hal_com.c +0 -19
index 50370b14ce7c..4f4a430c9f87 100644
@@ -751,25 +751,6 @@ void SetHalODMVar(
 	}
 }
 
-
-bool GetU1ByteIntegerFromStringInDecimal(char *Str, u8 *pInt)
-{
-	u16 i = 0;
-	*pInt = 0;
-
-	while (Str[i] != '\0') {
-		if (Str[i] >= '0' && Str[i] <= '9') {
-			*pInt *= 10;
-			*pInt += (Str[i] - '0');
-		} else
-			return false;
-
-		++i;
-	}
-
-	return true;
-}
-
 void rtw_hal_check_rxfifo_full(struct adapter *adapter)
 {
 	/* switch counter to RX fifo */
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0 -53

59 lines not on this page · raw message

drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.c +0 -21
index b0ca46aec1a5..90296eb806cb 100644
@@ -154,24 +154,3 @@ void odm_ConfigBB_PHY_8723B(
 	/*  Add 1us delay between BB/RF register setting. */
 	udelay(1);
 }
-
-void odm_ConfigBB_TXPWR_LMT_8723B(
-	struct dm_odm_t *pDM_Odm,
-	u8 *Regulation,
-	u8 *Bandwidth,
-	u8 *RateSection,
-	u8 *RfPath,
-	u8 *Channel,
-	u8 *PowerLimit
-)
-{
-	PHY_SetTxPowerLimit(
-		pDM_Odm->Adapter,
-		Regulation,
-		Bandwidth,
-		RateSection,
-		RfPath,
-		Channel,
-		PowerLimit
-	);
-}
drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.h +0 -9
index fba7053ee3e1..c9b56d4d85c3 100644
@@ -33,13 +33,4 @@ void odm_ConfigBB_PHY_8723B(struct dm_odm_t *pDM_Odm,
 			    u32 Data
 );
 
-void odm_ConfigBB_TXPWR_LMT_8723B(struct dm_odm_t *pDM_Odm,
-				  u8 *Regulation,
-				  u8 *Bandwidth,
-				  u8 *RateSection,
-				  u8 *RfPath,
-				  u8 *Channel,
-				  u8 *PowerLimit
-);
-
 #endif
drivers/staging/rtl8723bs/include/hal_com.h +0 -2
index 483f0390addc..7c67fee148fa 100644
@@ -141,8 +141,6 @@ void rtw_hal_check_rxfifo_full(struct adapter *adapter);
 u8 GetHalDefVar(struct adapter *adapter, enum hal_def_variable variable,
 		void *value);
 
-bool GetU1ByteIntegerFromStringInDecimal(char *str, u8 *in);
-
 #define		HWSET_MAX_SIZE			512
 
 void rtw_bb_rf_gain_offset(struct adapter *padapter);
drivers/staging/rtl8723bs/include/hal_com_phycfg.h +0 -3
index cb7c7ed74146..6aac5394f1ca 100644
@@ -94,9 +94,6 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 RegPwrTblSel,
 		      enum channel_width Bandwidth, u8 RfPath, u8 DataRate,
 		      u8 Channel);
 
-void PHY_SetTxPowerLimit(struct adapter *Adapter, u8 *Regulation, u8 *Bandwidth,
-			 u8 *RateSection, u8 *RfPath, u8 *Channel, u8 *PowerLimit);
-
 void PHY_ConvertTxPowerLimitToPowerIndex(struct adapter *Adapter);
 
 void PHY_InitTxPowerLimit(struct adapter *Adapter);
Signature · 1 line
2.53.0
#1 lore raw
kernel test robot noticed the following build errors:

Hi Bera,

kernel test robot noticed the following build errors:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Bera-Y-zl/staging-rtl8723bs-remove-reduntant-functions/20260322-055430
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20260321104001.46968-2-b9788213%40gmail.com
patch subject: [PATCH v2] staging: rtl8723bs: remove reduntant functions
config: i386-randconfig-051-20260322 (https://download.01.org/0day-ci/archive/20260323/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260323/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#2 lore raw
Quoted 3 lines · kernel test robot

Hi Bera,

kernel test robot noticed the following build errors:

I can't reproduce this with clang 19:

$ clang --version
Debian clang version 19.1.7 (3+b1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin

Bug in Clang? Or something happened to LKP?

+Cc: Nathan et alii.

Also, looking at the code I don't see how it's possible (yes, there is a dangling declaration which has to be removed, but shouldn't it be rather a compiler warning something near to declared-but-not-used?).

Bera, you need to remove the definition from
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.h.

Quoted 18 lines

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

url:    https://github.com/intel-lab-lkp/linux/commits/Bera-Y-zl/staging-rtl8723bs-remove-reduntant-functions/20260322-055430
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20260321104001.46968-2-b9788213%40gmail.com
patch subject: [PATCH v2] staging: rtl8723bs: remove reduntant functions
config: i386-randconfig-051-20260322 (https://download.01.org/0day-ci/archive/20260323/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260323/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>, old ones prefixed by <<):

Quoted 1 line
Quoted 1 line

ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 5 lines · Andy Shevchenko
Quoted 3 lines · kernel test robot

Hi Bera,

kernel test robot noticed the following build errors:

Quoted 8 lines

I can't reproduce this with clang 19:

$ clang --version
Debian clang version 19.1.7 (3+b1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin

Bug in Clang? Or something happened to LKP?

This is reproducible with GCC 15.2.0 for me:

  $ curl -LSso .config https://download.01.org/0day-ci/archive/20260323/[email protected]/config
  $ make -skj"$(nproc)" ARCH=i386 CROSS_COMPILE=i386-linux- olddefconfig all
  ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!
  make[4]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
Quoted 5 lines

+Cc: Nathan et alii.

Also, looking at the code I don't see how it's possible (yes, there is a dangling declaration which has to be removed, but shouldn't it be rather a compiler warning something near to declared-but-not-used?).

ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() is used through READ_AND_CONFIG() in drivers/staging/rtl8723bs/hal/odm_HWConfig.c:

  $ rg READ_AND_CONFIG drivers/staging/rtl8723bs/hal/odm_HWConfig.c
  10:#define READ_AND_CONFIG_MP(ic, txt) (ODM_ReadAndConfig_MP_##ic##txt(pDM_Odm))
  11:#define READ_AND_CONFIG     READ_AND_CONFIG_MP
  418:            READ_AND_CONFIG(8723B, _RadioA);
  420:            READ_AND_CONFIG(8723B, _TXPWR_LMT);
  428:            READ_AND_CONFIG(8723B, _TxPowerTrack_SDIO);
  438:            READ_AND_CONFIG(8723B, _PHY_REG);
  440:            READ_AND_CONFIG(8723B, _AGC_TAB);
  442:            READ_AND_CONFIG(8723B, _PHY_REG_PG);
Quoted 27 lines

Bera, you need to remove the definition from
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.h.

Quoted 18 lines

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

url:    https://github.com/intel-lab-lkp/linux/commits/Bera-Y-zl/staging-rtl8723bs-remove-reduntant-functions/20260322-055430
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20260321104001.46968-2-b9788213%40gmail.com
patch subject: [PATCH v2] staging: rtl8723bs: remove reduntant functions
config: i386-randconfig-051-20260322 (https://download.01.org/0day-ci/archive/20260323/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260323/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>, old ones prefixed by <<):

Quoted 1 line
Quoted 1 line

ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 23 lines · Nathan Chancellor
Quoted 5 lines · Andy Shevchenko
Quoted 3 lines · kernel test robot

Hi Bera,

kernel test robot noticed the following build errors:

Quoted 8 lines

I can't reproduce this with clang 19:

$ clang --version
Debian clang version 19.1.7 (3+b1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin

Bug in Clang? Or something happened to LKP?

This is reproducible with GCC 15.2.0 for me:

  $ curl -LSso .config https://download.01.org/0day-ci/archive/20260323/[email protected]/config
  $ make -skj"$(nproc)" ARCH=i386 CROSS_COMPILE=i386-linux- olddefconfig all
  ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!
  make[4]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
Quoted 8 lines
Quoted 5 lines

+Cc: Nathan et alii.

Also, looking at the code I don't see how it's possible (yes, there is a dangling declaration which has to be removed, but shouldn't it be rather a compiler warning something near to declared-but-not-used?).

ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() is used through READ_AND_CONFIG() in drivers/staging/rtl8723bs/hal/odm_HWConfig.c:

Ah, It seems the question is the architecture, I used x86_64. Thanks for pointing out this. So the patch in the current state is no go.

Quoted 31 lines
  $ rg READ_AND_CONFIG drivers/staging/rtl8723bs/hal/odm_HWConfig.c
  10:#define READ_AND_CONFIG_MP(ic, txt) (ODM_ReadAndConfig_MP_##ic##txt(pDM_Odm))
  11:#define READ_AND_CONFIG     READ_AND_CONFIG_MP
  418:            READ_AND_CONFIG(8723B, _RadioA);
  420:            READ_AND_CONFIG(8723B, _TXPWR_LMT);
  428:            READ_AND_CONFIG(8723B, _TxPowerTrack_SDIO);
  438:            READ_AND_CONFIG(8723B, _PHY_REG);
  440:            READ_AND_CONFIG(8723B, _AGC_TAB);
  442:            READ_AND_CONFIG(8723B, _PHY_REG_PG);
Quoted 21 lines

Bera, you need to remove the definition from
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.h.

Quoted 18 lines

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

url:    https://github.com/intel-lab-lkp/linux/commits/Bera-Y-zl/staging-rtl8723bs-remove-reduntant-functions/20260322-055430
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20260321104001.46968-2-b9788213%40gmail.com
patch subject: [PATCH v2] staging: rtl8723bs: remove reduntant functions
config: i386-randconfig-051-20260322 (https://download.01.org/0day-ci/archive/20260323/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260323/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>, old ones prefixed by <<):

Quoted 1 line
Quoted 1 line

ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!

Signature · 2 lines
With Best Regards,
Andy Shevchenko