* [PATCH] libnvdimm, btt: use %z format string modifier for size_t
@ 2017-09-08 21:08 Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2017-09-08 21:08 UTC (permalink / raw)
To: Vishal Verma, Dan Williams
Cc: Arnd Bergmann, Jens Axboe, Dmitry Monakhov, Martin K. Petersen,
linux-nvdimm, linux-kernel
We get a warning about an two incorrect format strings:
drivers/nvdimm/btt.c: In function 'btt_map_init':
include/linux/device.h:1472:23: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'size_t {aka unsigned int}' [-Werror=format=]
This changes the %lx to %zx as it should be.
Fixes: 86652d2eb347 ("libnvdimm, btt: clean up warning and error messages")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/nvdimm/btt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 5bc686e9195a..d5612bd1cc81 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -428,7 +428,7 @@ static int btt_map_init(struct arena_info *arena)
size_t size = min(mapsize, chunk_size);
dev_WARN_ONCE(to_dev(arena), size < 512,
- "chunk size: %#lx is unaligned\n", size);
+ "chunk size: %#zx is unaligned\n", size);
ret = arena_write_bytes(arena, arena->mapoff + offset, zerobuf,
size, 0);
if (ret)
@@ -472,7 +472,7 @@ static int btt_log_init(struct arena_info *arena)
size_t size = min(logsize, chunk_size);
dev_WARN_ONCE(to_dev(arena), size < 512,
- "chunk size: %#lx is unaligned\n", size);
+ "chunk size: %#zx is unaligned\n", size);
ret = arena_write_bytes(arena, arena->logoff + offset, zerobuf,
size, 0);
if (ret)
--
2.9.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-08 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-08 21:08 [PATCH] libnvdimm, btt: use %z format string modifier for size_t Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®