Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/bootconfig: Fix the wrong format specifier

Use '%u' instead of '%d' for unsigned int.

Link: https://lore.kernel.org/all/20241105011048.201629-1-luoyifan@cmss.chinamobile.com/

Fixes: 973780011106 ("tools/bootconfig: Suppress non-error messages")
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

authored by

Luo Yifan and committed by
Masami Hiramatsu (Google)
f6ab7384 ffd294d3

+2 -2
+2 -2
tools/bootconfig/main.c
··· 226 226 /* Wrong Checksum */ 227 227 rcsum = xbc_calc_checksum(*buf, size); 228 228 if (csum != rcsum) { 229 - pr_err("checksum error: %d != %d\n", csum, rcsum); 229 + pr_err("checksum error: %u != %u\n", csum, rcsum); 230 230 return -EINVAL; 231 231 } 232 232 ··· 395 395 xbc_get_info(&ret, NULL); 396 396 printf("\tNumber of nodes: %d\n", ret); 397 397 printf("\tSize: %u bytes\n", (unsigned int)size); 398 - printf("\tChecksum: %d\n", (unsigned int)csum); 398 + printf("\tChecksum: %u\n", (unsigned int)csum); 399 399 400 400 /* TODO: Check the options by schema */ 401 401 xbc_exit();