include/linux/amd-pstate.h:87:27: warning: 'amd_pstate_mode_string' defined but not used

From: kernel test robot
Date: Sun Dec 10 2023 - 02:41:41 EST


Hi Wyes,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c527f5606aa545233a4d2c6d5c636ed82b8633ef
commit: 36c5014e5460963ad7766487c0e22a7ff28681fc cpufreq: amd-pstate: optimize driver working mode selection in amd_pstate_param()
date: 10 months ago
config: x86_64-buildonly-randconfig-004-20231010 (https://download.01.org/0day-ci/archive/20231210/202312101512.2BOW7iSz-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231210/202312101512.2BOW7iSz-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/202312101512.2BOW7iSz-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from drivers/cpufreq/amd-pstate-ut.c:29:
>> include/linux/amd-pstate.h:87:27: warning: 'amd_pstate_mode_string' defined but not used [-Wunused-const-variable=]
87 | static const char * const amd_pstate_mode_string[] = {
| ^~~~~~~~~~~~~~~~~~~~~~


vim +/amd_pstate_mode_string +87 include/linux/amd-pstate.h

86
> 87 static const char * const amd_pstate_mode_string[] = {
88 [AMD_PSTATE_DISABLE] = "disable",
89 [AMD_PSTATE_PASSIVE] = "passive",
90 [AMD_PSTATE_ACTIVE] = "active",
91 NULL,
92 };
93

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki