Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508658 > unrolled thread

[PATCH] crypto: caam: fix type mismatch warning

Started byArnd Bergmann <arnd@arndb.de>
First post2016-10-25 23:30 +0200
Last post2016-10-26 08:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] crypto: caam: fix type mismatch warning Arnd Bergmann <arnd@arndb.de> - 2016-10-25 23:30 +0200
    Re: [PATCH] crypto: caam: fix type mismatch warning Horia Geanta Neag <horia.geanta@nxp.com> - 2016-10-26 08:40 +0200

#1508658 — [PATCH] crypto: caam: fix type mismatch warning

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-25 23:30 +0200
Subject[PATCH] crypto: caam: fix type mismatch warning
Message-ID<swhse-2CS-17@gated-at.bofh.it>
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>
---
This is currently the only warning reported by kernelci.org for
linux-4.9 on arm, arm64 and x86.
---
 drivers/crypto/caam/caamalg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 156aad167cd6..8de85dfb1b04 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;
-- 
2.9.0

[toc] | [next] | [standalone]


#1508822

FromHoria Geanta Neag <horia.geanta@nxp.com>
Date2016-10-26 08:40 +0200
Message-ID<swq2t-8jC-9@gated-at.bofh.it>
In reply to#1508658
On 10/26/2016 12:29 AM, Arnd Bergmann wrote:
> 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>

Thanks,
Horia

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web