Skip to contentSkip to conversation

arch/x86/kernel/traps.c:176:46: warning: format specifies type 'unsigned long' but the argument has type 'void *'

PATCH kernel test robot 1 participant 1 message Nov 29

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

Hi Idan,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android12-kiwi-5.10
head:   0453373a7fdf03ac0f4bdc1c4830bd9ece442f09
commit: e4f1f4c9a6f6bdc4ed2f2d6d05fe5cd78af07bdf [332/332] ANDROID: Add kiwi_fault_logging kernel parameter
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20261129/[email protected]/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 04597ff5c4eda9d66da39a536aa26a7bab2fb2dd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/[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 >>):

>> arch/x86/kernel/traps.c:176:46: warning: format specifies type 'unsigned long' but the argument has type 'void *' [-Wformat]
     175 |             printk(KERN_ALERT "%s[%d]: do_error_trap for %s at %lx trapnr %lx signr %lx sicode %lx ip %px sp %px error %lx",
         |                                                                ~~~
     176 |                         current->comm, task_pid_nr(current), str, addr, trapnr, signr,
         |                                                                   ^~~~
>> arch/x86/kernel/traps.c:176:60: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
     175 |             printk(KERN_ALERT "%s[%d]: do_error_trap for %s at %lx trapnr %lx signr %lx sicode %lx ip %px sp %px error %lx",
         |                                                                                     ~~~
         |                                                                                     %x
     176 |                         current->comm, task_pid_nr(current), str, addr, trapnr, signr,
         |                                                                                 ^~~~~
   arch/x86/kernel/traps.c:177:4: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
     175 |             printk(KERN_ALERT "%s[%d]: do_error_trap for %s at %lx trapnr %lx signr %lx sicode %lx ip %px sp %px error %lx",
         |                                                                                                ~~~
         |                                                                                                %x
     176 |                         current->comm, task_pid_nr(current), str, addr, trapnr, signr,
     177 |                         sicode, (void *)regs->ip, (void *)regs->sp, error_code);
         |                         ^~~~~~

3 warnings generated.

vim +176 arch/x86/kernel/traps.c

170
171 static void do_error_trap(struct pt_regs *regs, long error_code, char *str,
172 unsigned long trapnr, int signr, int sicode, void __user *addr)
173 {
174 if (unlikely(kiwi_fault_logging)) {
175 printk(KERN_ALERT "%s[%d]: do_error_trap for %s at %lx trapnr %lx signr %lx sicode %lx ip %px sp %px error %lx",

 > 176				current->comm, task_pid_nr(current), str, addr, trapnr, signr,

177 sicode, (void *)regs->ip, (void *)regs->sp, error_code);
178 }
179 RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
180
181 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) !=
182 NOTIFY_STOP) {
183 cond_local_irq_enable(regs);
184 do_trap(trapnr, signr, str, regs, error_code, sicode, addr);
185 cond_local_irq_disable(regs);
186 }
187 }
188

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