Re: [PATCH v2] staging: rtl8723bs: remove reduntant functions
From: Nathan Chancellor
Date: Mon Mar 23 2026 - 19:05:22 EST
On Mon, Mar 23, 2026 at 10:24:02AM +0200, Andy Shevchenko wrote:
> On Mon, Mar 23, 2026 at 02:47:35AM +0800, kernel test robot wrote:
> > 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?
This is reproducible with GCC 15.2.0 for me:
$ curl -LSso .config https://download.01.org/0day-ci/archive/20260323/202603230240.3WRmMrTj-lkp@xxxxxxxxx/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
> +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);
> Bera, you need to remove the definition from
> drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.h.
>
> > [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/202603230240.3WRmMrTj-lkp@xxxxxxxxx/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/202603230240.3WRmMrTj-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202603230240.3WRmMrTj-lkp@xxxxxxxxx/
> >
> > All errors (new ones prefixed by >>, old ones prefixed by <<):
> >
> > >> ERROR: modpost: "ODM_ReadAndConfig_MP_8723B_TXPWR_LMT" [drivers/staging/rtl8723bs/r8723bs.ko] undefined!
>
> --
> With Best Regards,
> Andy Shevchenko
>
>