Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298936
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] printk: nmi: Use correct format specifier for size_t |
| Date | 2015-12-29 11:40 +0100 |
| Message-ID | <qKZR7-7Cm-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Thierry Reding <treding@nvidia.com>
The correct format specifier for arguments of type size_t is %zu. Using
anything else is bound to trigger warnings on either 32-bit or 64-bit
builds.
Fixes: 0dcfca2060ee ("printk-nmi-generic-solution-for-safe-printk-in-nmi-v4")
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Petr Mladek <pmladek@suse.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
kernel/printk/nmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/printk/nmi.c b/kernel/printk/nmi.c
index 92c61e960c4a..cdee2707a1f2 100644
--- a/kernel/printk/nmi.c
+++ b/kernel/printk/nmi.c
@@ -140,7 +140,7 @@ more:
* @len must only increase.
*/
if (i && i >= len)
- pr_err("printk_nmi_flush: internal error: i=%d >= len=%lu\n",
+ pr_err("printk_nmi_flush: internal error: i=%d >= len=%zu\n",
i, len);
if (!len)
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] printk: nmi: Use correct format specifier for size_t Thierry Reding <thierry.reding@gmail.com> - 2015-12-29 11:40 +0100
csiph-web