]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sysfs: fix crash_notes_size build warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 3 Apr 2013 15:18:24 +0000 (15:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2013 18:09:03 +0000 (11:09 -0700)
commit eca4549f57 "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: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cpu.c

index a55b5909176f4e82792de7acd50cccd1f08b82ff..d8c7f3ee6e192b0b6a5c0abde3714c2e86735dd1 100644 (file)
@@ -139,7 +139,7 @@ static ssize_t show_crash_notes_size(struct device *dev,
 {
        ssize_t rc;
 
-       rc = sprintf(buf, "%lu\n", sizeof(note_buf_t));
+       rc = sprintf(buf, "%zu\n", sizeof(note_buf_t));
        return rc;
 }
 static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL);