From: Arnd Bergmann Date: Tue, 25 Oct 2016 21:29:10 +0000 (+0200) Subject: crypto: caam - fix type mismatch warning X-Git-Tag: v4.14-rc1~1976^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5a40d4624cd2328c69768f6eb41716fc249d7be;p=platform%2Fkernel%2Flinux-rpi.git crypto: caam - fix type mismatch warning 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 Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index f5a63ba..954a64c 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -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;