Re: [PATCH] PM: ACPI: reboot: Reinstate S5 for reboot

From: kernel test robot
Date: Mon Sep 05 2022 - 12:32:51 EST


Hi Kai-Heng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on linus/master v6.0-rc4 next-20220901]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Kai-Heng-Feng/PM-ACPI-reboot-Reinstate-S5-for-reboot/20220905-152323
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: mips-randconfig-r034-20220905 (https://download.01.org/0day-ci/archive/20220906/202209060009.J18tERPi-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/b2191fe14b5426dcef80f2935fdfa47af98b0ee2
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Kai-Heng-Feng/PM-ACPI-reboot-Reinstate-S5-for-reboot/20220905-152323
git checkout b2191fe14b5426dcef80f2935fdfa47af98b0ee2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> kernel/reboot.c:257:6: error: use of undeclared identifier 'pm_power_off_prepare'; did you mean 'pm_generic_prepare'?
if (pm_power_off_prepare)
^~~~~~~~~~~~~~~~~~~~
pm_generic_prepare
include/linux/pm.h:795:12: note: 'pm_generic_prepare' declared here
extern int pm_generic_prepare(struct device *dev);
^
>> kernel/reboot.c:258:3: error: call to undeclared function 'pm_power_off_prepare'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
pm_power_off_prepare();
^
2 errors generated.


vim +257 kernel/reboot.c

245
246 /**
247 * kernel_restart - reboot the system
248 * @cmd: pointer to buffer containing command to execute for restart
249 * or %NULL
250 *
251 * Shutdown everything and perform a clean reboot.
252 * This is not safe to call in interrupt context.
253 */
254 void kernel_restart(char *cmd)
255 {
256 kernel_restart_prepare(cmd);
> 257 if (pm_power_off_prepare)
> 258 pm_power_off_prepare();
259 migrate_to_reboot_cpu();
260 syscore_shutdown();
261 if (!cmd)
262 pr_emerg("Restarting system\n");
263 else
264 pr_emerg("Restarting system with command '%s'\n", cmd);
265 kmsg_dump(KMSG_DUMP_SHUTDOWN);
266 machine_restart(cmd);
267 }
268 EXPORT_SYMBOL_GPL(kernel_restart);
269

--
0-DAY CI Kernel Test Service
https://01.org/lkp