kernel/reboot.c:73:13: warning: variable 'shutdown_legacy' set but not used
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git superm1/s4-at-s5 head: 8dd92ed84c02d78694d091fcc20a976f096bb27e commit: 8dd92ed84c02d78694d091fcc20a976f096bb27e [3/3] PM: Add shutdown=legacy command line option config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20261110/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project fc9576e3b179738d99c5babe5cd9d6c1f883e0db) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261110/[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 warnings (new ones prefixed by >>):
>> kernel/reboot.c:73:13: warning: variable 'shutdown_legacy' set but not used [-Wunused-but-set-global]
73 | static bool shutdown_legacy;
| ^1 warning generated.
vim +/shutdown_legacy +73 kernel/reboot.c
65
66 /*
67 * This variable is used to indicate if a halt was initiated instead of a
68 * reboot when the reboot call was invoked with LINUX_REBOOT_CMD_POWER_OFF, but
69 * the system cannot be powered off. This allowes kernel_halt() to notify users
70 * of that.
71 */
72 static bool poweroff_fallback_to_halt;
> 73 static bool shutdown_legacy;
74 --
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki