Commit 04c3c982 authored by Randy Dunlap's avatar Randy Dunlap Committed by Dan Williams

libnvdimm, btt: fix format string warnings

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,
   ^

Fixes: 86652d2e ("libnvdimm, btt: clean up warning and error messages")
Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 86652d2e
...@@ -428,7 +428,7 @@ static int btt_map_init(struct arena_info *arena) ...@@ -428,7 +428,7 @@ static int btt_map_init(struct arena_info *arena)
size_t size = min(mapsize, chunk_size); size_t size = min(mapsize, chunk_size);
dev_WARN_ONCE(to_dev(arena), size < 512, 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, ret = arena_write_bytes(arena, arena->mapoff + offset, zerobuf,
size, 0); size, 0);
if (ret) if (ret)
...@@ -472,7 +472,7 @@ static int btt_log_init(struct arena_info *arena) ...@@ -472,7 +472,7 @@ static int btt_log_init(struct arena_info *arena)
size_t size = min(logsize, chunk_size); size_t size = min(logsize, chunk_size);
dev_WARN_ONCE(to_dev(arena), size < 512, 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, ret = arena_write_bytes(arena, arena->logoff + offset, zerobuf,
size, 0); size, 0);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment