Re: [PATCH] PM / sleep: Mechanism to find source aborting kernel suspend transition
From: kernel test robot
Date: Sat Dec 09 2023 - 12:53:15 EST
Hi Vimal,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/acpi-bus linus/master rafael-pm/devprop v6.7-rc4 next-20231208]
[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/Vimal-Kumar/PM-sleep-Mechanism-to-find-source-aborting-kernel-suspend-transition/20231209-161237
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20231209081056.1497-1-vimal.kumar32%40gmail.com
patch subject: [PATCH] PM / sleep: Mechanism to find source aborting kernel suspend transition
config: powerpc-randconfig-r071-20231209 (https://download.01.org/0day-ci/archive/20231210/202312100106.hPaGgy7C-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231210/202312100106.hPaGgy7C-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/202312100106.hPaGgy7C-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> drivers/base/power/wakeup.c:607:6: warning: no previous prototype for function 'pm_add_abort_suspend_source' [-Wmissing-prototypes]
607 | void pm_add_abort_suspend_source(const char *source_name)
| ^
drivers/base/power/wakeup.c:607:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
607 | void pm_add_abort_suspend_source(const char *source_name)
| ^
| static
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
955 | list_for_each_entry(info, &pm_abort_suspend_list, list) {
| ^
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:955:24: error: use of undeclared identifier 'info'
drivers/base/power/wakeup.c:956:5: error: call to undeclared function 'log_suspend_abort_reason'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
956 | log_suspend_abort_reason("ws or subsystem %s aborted suspend\n",
| ^
drivers/base/power/wakeup.c:957:7: error: use of undeclared identifier 'info'
957 | info->source_triggering_abort_suspend);
| ^
drivers/base/power/wakeup.c:967:11: error: use of undeclared identifier 'MAX_SUSPEND_ABORT_LEN'
967 | char buf[MAX_SUSPEND_ABORT_LEN];
| ^
1 warning and 12 errors generated.
vim +/pm_add_abort_suspend_source +607 drivers/base/power/wakeup.c
602
603 /**
604 * pm_add_abort_suspend_source: add sources who aborted system suspend transitions.
605 * @func_name: Name of the WS or subsystem which needs to added in the list
606 */
> 607 void pm_add_abort_suspend_source(const char *source_name)
608 {
609 struct pm_abort_suspend_source *info = NULL;
610
611 info = kmalloc(sizeof(struct pm_abort_suspend_source), GFP_KERNEL);
612 if (unlikely(!info)) {
613 pr_err("Failed to alloc memory for pm_abort_suspend_source info\n");
614 return;
615 }
616
617 /* Initialize the list within the struct if it's not already initialized */
618 if (list_empty(&info->list))
619 INIT_LIST_HEAD(&info->list);
620
621 info->source_triggering_abort_suspend = kstrdup(source_name, GFP_KERNEL);
622 if (unlikely(!info->source_triggering_abort_suspend)) {
623 pr_err("Failed to get abort_suspend source_name\n");
624 kfree(info);
625 return;
626 }
627
628 list_add_tail(&info->list, &pm_abort_suspend_list);
629 }
630 EXPORT_SYMBOL_GPL(pm_add_abort_suspend_source);
631
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki