Skip to content

Commit

Permalink
crypto: caam - fix type mismatch warning
Browse files Browse the repository at this point in the history
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: 5ecf8ef ("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>
  • Loading branch information
Arnd Bergmann authored and Herbert Xu committed Nov 1, 2016
1 parent 9ae811f commit d69985a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/caam/caamalg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d69985a

Please sign in to comment.