libnvdimm, btt: use %z format string modifier for size_t
PATCH 1/1 libnvdimm, btt: use %z format string modifier for size_t
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 <[email protected]>
--- drivers/nvdimm/btt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvdimm/btt.c +2 -2
@@ -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)
Signature · 6 lines
2.9.0 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm