Re: [PATCH 0001/0001] format idle IP output func+offset/length

From: kbuild test robot
Date: Wed Nov 08 2017 - 22:11:31 EST


Hi Changcheng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.14-rc8]
[cannot apply to next-20171108]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Liu-Changcheng/format-idle-IP-output-func-offset-length/20171109-100035
config: i386-randconfig-x074-201745 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:14,
from include/linux/cpumask.h:10,
from lib/nmi_backtrace.c:16:
lib/nmi_backtrace.c: In function 'nmi_cpu_backtrace':
>> include/linux/kern_levels.h:5:18: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:304:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:305:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
>> lib/nmi_backtrace.c:96:4: note: in expansion of macro 'pr_warn'
pr_warn("NMI backtrace for cpu %d skipped: idling at pc %pS\n",
^~~~~~~

vim +/pr_warn +96 lib/nmi_backtrace.c

87
88 bool nmi_cpu_backtrace(struct pt_regs *regs)
89 {
90 static arch_spinlock_t lock = __ARCH_SPIN_LOCK_UNLOCKED;
91 int cpu = smp_processor_id();
92
93 if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
94 arch_spin_lock(&lock);
95 if (regs && cpu_in_idle(instruction_pointer(regs))) {
> 96 pr_warn("NMI backtrace for cpu %d skipped: idling at pc %pS\n",

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip