]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
crypto: caam - fix type mismatch warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 25 Oct 2016 21:29:10 +0000 (23:29 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Nov 2016 14:14:21 +0000 (22:14 +0800)
Building the caam driver on arm64 produces a harmless warning:

drivers/crypto/caam/caamalg.c:140:139: warning: comparison of distinct pointer types lacks a cast

We can use min_t to tell the compiler which type we want it to use
here.

Fixes: 5ecf8ef9103c ("crypto: caam - fix sg dump")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c

index f5a63ba9702363e16b1d7cdb8206280feb4b4f37..954a64c7757b10e1551672861a6ef28623e57019 100644 (file)
@@ -137,7 +137,7 @@ static void dbg_dump_sg(const char *level, const char *prefix_str,
                }
 
                buf = it_page + it->offset;
-               len = min(tlen, it->length);
+               len = min_t(size_t, tlen, it->length);
                print_hex_dump(level, prefix_str, prefix_type, rowsize,
                               groupsize, buf, len, ascii);
                tlen -= len;