[PATCH -next] nvdimm: btt.c: fix format string warnings
From: Randy Dunlap
Date: Fri Sep 08 2017 - 12:37:07 EST
From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Fix format warnings (seen on i386) in nvdimm/btt.c:
../drivers/nvdimm/btt.c: In function âbtt_map_initâ:
../drivers/nvdimm/btt.c:430:3: warning: format â%lxâ expects argument of type âlong unsigned intâ, but argument 4 has type âsize_tâ [-Wformat=]
dev_WARN_ONCE(to_dev(arena), size < 512,
^
../drivers/nvdimm/btt.c: In function âbtt_log_initâ:
../drivers/nvdimm/btt.c:474:3: warning: format â%lxâ expects argument of type âlong unsigned intâ, but argument 4 has type âsize_tâ [-Wformat=]
dev_WARN_ONCE(to_dev(arena), size < 512,
^
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Vishal Verma <vishal.l.verma@xxxxxxxxx>
Cc: linux-nvdimm@xxxxxxxxxxxx
---
drivers/nvdimm/btt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20170908.orig/drivers/nvdimm/btt.c
+++ linux-next-20170908/drivers/nvdimm/btt.c
@@ -428,7 +428,7 @@ static int btt_map_init(struct arena_inf
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_inf
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)