]> asedeno.scripts.mit.edu Git - linux.git/commit
dmaengine: iop-adma: use correct printk format strings
authorArnd Bergmann <arnd@arndb.de>
Fri, 9 Aug 2019 16:33:17 +0000 (18:33 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 14 Aug 2019 13:36:21 +0000 (15:36 +0200)
commit00c9755524fbaa28117be774d7c92fddb5ca02f3
tree8fb437c1283ccd06a47641d025d785fc02c04864
parent7f8bf11a4c2c100b8107922ad8f84d0117dd6cb3
dmaengine: iop-adma: use correct printk format strings

When compile-testing on other architectures, we get lots of warnings
about incorrect format strings, like:

   drivers/dma/iop-adma.c: In function 'iop_adma_alloc_slots':
   drivers/dma/iop-adma.c:307:6: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]

   drivers/dma/iop-adma.c: In function 'iop_adma_prep_dma_memcpy':
>> drivers/dma/iop-adma.c:518:40: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=]

Use %zu for printing size_t as required, and cast the dma_addr_t
arguments to 'u64' for printing with %llx. Ideally this should use
the %pad format string, but that requires an lvalue argument that
doesn't work here.

Link: https://lore.kernel.org/r/20190809163334.489360-3-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/dma/iop-adma.c