]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
crypto: mediatek - fix format string for 64-bit builds
authorArnd Bergmann <arnd@arndb.de>
Wed, 11 Jan 2017 13:55:20 +0000 (14:55 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Jan 2017 16:26:47 +0000 (00:26 +0800)
commit41e05324fde983b1342f86239868f1959f6032a5
treeaa9070f4d66e2bb85ee5b0f96af0a717cbde3de1
parent7dee9f618790d0b723b29c46da10bffc7974a772
crypto: mediatek - fix format string for 64-bit builds

After I enabled COMPILE_TEST for non-ARM targets, I ran into these
warnings:

crypto/mediatek/mtk-aes.c: In function 'mtk_aes_info_map':
crypto/mediatek/mtk-aes.c:224:28: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   dev_err(cryp->dev, "dma %d bytes error\n", sizeof(*info));
crypto/mediatek/mtk-sha.c:344:28: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=]
crypto/mediatek/mtk-sha.c:550:21: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]

The correct format for size_t is %zu, so use that in all three
cases.

Fixes: 785e5c616c84 ("crypto: mediatek - Add crypto driver support for some MediaTek chips")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mediatek/mtk-aes.c
drivers/crypto/mediatek/mtk-sha.c