Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1529556
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] z3fold: use %z modifier for format string |
| Date | 2016-11-24 17:40 +0100 |
| Message-ID | <sH5e2-5eA-31@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Printing a size_t requires the %zd format rather than %d:
mm/z3fold.c: In function ‘init_z3fold’:
include/linux/kern_levels.h:4:18: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=]
Fixes: 50a50d2676c4 ("z3fold: don't fail kernel build if z3fold_header is too big")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
mm/z3fold.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/z3fold.c b/mm/z3fold.c
index e282ba073e77..66ac7a7dc934 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -884,7 +884,7 @@ static int __init init_z3fold(void)
{
/* Fail the initialization if z3fold header won't fit in one chunk */
if (sizeof(struct z3fold_header) > ZHDR_SIZE_ALIGNED) {
- pr_err("z3fold: z3fold_header size (%d) is bigger than "
+ pr_err("z3fold: z3fold_header size (%zd) is bigger than "
"the chunk size (%d), can't proceed\n",
sizeof(struct z3fold_header) , ZHDR_SIZE_ALIGNED);
return -E2BIG;
--
2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] z3fold: use %z modifier for format string Arnd Bergmann <arnd@arndb.de> - 2016-11-24 17:40 +0100
Re: [PATCH] z3fold: use %z modifier for format string Joe Perches <joe@perches.com> - 2016-11-24 18:10 +0100
Re: [PATCH] z3fold: use %z modifier for format string Vitaly Wool <vitalywool@gmail.com> - 2016-11-25 08:40 +0100
Re: [PATCH] z3fold: use %z modifier for format string Arnd Bergmann <arnd@arndb.de> - 2016-11-25 09:50 +0100
Re: [PATCH] z3fold: use %z modifier for format string Vitaly Wool <vitalywool@gmail.com> - 2016-11-25 17:10 +0100
Re: [PATCH] z3fold: use %z modifier for format string Arnd Bergmann <arnd@arndb.de> - 2016-11-25 17:20 +0100
Re: [PATCH] z3fold: use %z modifier for format string Dan Streetman <ddstreet@ieee.org> - 2016-11-25 19:40 +0100
Re: [PATCH] z3fold: use %z modifier for format string Vitaly Wool <vitalywool@gmail.com> - 2016-11-25 08:40 +0100
csiph-web