Commit bcfb87fb authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

sysfs: fix crash_notes_size build warning

commit eca4549f "sysfs: Add crash_notes_size to export percpu
note size" adds a printk that outputs a size_t value as %lu
when it should be %zu, resulting in this warning.

drivers/base/cpu.c: In function 'show_crash_notes_size':
drivers/base/cpu.c:142:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7db5e76
...@@ -139,7 +139,7 @@ static ssize_t show_crash_notes_size(struct device *dev, ...@@ -139,7 +139,7 @@ static ssize_t show_crash_notes_size(struct device *dev,
{ {
ssize_t rc; ssize_t rc;
rc = sprintf(buf, "%lu\n", sizeof(note_buf_t)); rc = sprintf(buf, "%zu\n", sizeof(note_buf_t));
return rc; return rc;
} }
static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL); static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment