sysfs: fix crash_notes_size build warning
PATCH 1/1 sysfs: fix crash_notes_size build warning
Quoted 1 line
From
b60d17603df3225d9f51c4f8168e8e00a1090911Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Wed, 3 Apr 2013 17:14:32 +0200
Subject: [PATCH] sysfs: fix crash_notes_size build warning
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=]
drivers/base/cpu.c +1 -1
@@ -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);
Quoted 9 lines · Arnd Bergmann
From
b60d17603df3225d9f51c4f8168e8e00a1090911Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Wed, 3 Apr 2013 17:14:32 +0200
Subject: [PATCH] sysfs: fixcrash_notes_sizebuild warningcommit
eca4549f57"sysfs: Addcrash_notes_sizeto export percpu note size" adds a printk that outputs asize_tvalue as %lu when it should be %zu, resulting in this warning.
Quoted 7 lines
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=]Signed-off-by Arnd Bergmann <[email protected]>Cc Zhang Yanfei <[email protected]>Cc Simon Horman <[email protected]>Cc Greg Kroah-Hartman <[email protected]>
Sorry for letting that slip through.
Quoted 15 lines
drivers/base/cpu.c +1
-1@@ -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);