On Sat, Jan 25, 2025 at 10:16:20PM +0800, kernel test robot wrote: > Hi Dave, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on staging/staging-testing] > > url: https://github.com/intel-lab-lkp/linux/commits/Dave-Penkler/staging-gpib-Fix-pr_err-format-warning/20250124-190232 > base: staging/staging-testing > patch link: https://lore.kernel.org/r/20250124105900.27592-4-dpenkler%40gmail.com > patch subject: [PATCH 3/3] staging: gpib: Remove depends on BROKEN > config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250125/202501252218.eaGgSuN3-lkp@xxxxxxxxx/config) > compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250125/202501252218.eaGgSuN3-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/202501252218.eaGgSuN3-lkp@xxxxxxxxx/ > > All warnings (new ones prefixed by >>): > > >> drivers/staging/gpib/hp_82341/hp_82341.c:802:35: warning: unused variable 'hp_82341_pnp_table' [-Wunused-const-variable] > 802 | static const struct pnp_device_id hp_82341_pnp_table[] = { > | ^~~~~~~~~~~~~~~~~~ > 1 warning generated. > > > vim +/hp_82341_pnp_table +802 drivers/staging/gpib/hp_82341/hp_82341.c > > 6d4f8749cd5da8 Dave Penkler 2024-09-18 801 > 6d4f8749cd5da8 Dave Penkler 2024-09-18 @802 static const struct pnp_device_id hp_82341_pnp_table[] = { > 6d4f8749cd5da8 Dave Penkler 2024-09-18 803 {.id = "HWP1411"}, > 6d4f8749cd5da8 Dave Penkler 2024-09-18 804 {.id = ""} > 6d4f8749cd5da8 Dave Penkler 2024-09-18 805 }; > 6d4f8749cd5da8 Dave Penkler 2024-09-18 806 MODULE_DEVICE_TABLE(pnp, hp_82341_pnp_table); > 6d4f8749cd5da8 Dave Penkler 2024-09-18 807 > The MODULE_DEVICE_TABLE macro does not really "use" the hp_82341_pnp_table variable. It just generates a mangled symbol with it but it also adds the unused attribute. However when compiled as a built-in the macro is a no-op and so the variable is flagged as unused. I think the unused pnp_device_id variables and their MODULE_DEVICE_TABLE declarations can safely be removed or bracketed by an #ifdef MODULE The same problem exists in drivers/staging/gpib/tnt4882/tnt4882_gpib.c and drivers/comedi/drivers/ni_atmio.c -dave