mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants
@ 2017-11-15 10:44 Geert Uytterhoeven
  2017-11-15 14:26 ` Stephan Mueller
  2017-11-29  6:36 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-11-15 10:44 UTC (permalink / raw)
  To: Stephan Mueller, Herbert Xu, David S . Miller
  Cc: Arnd Bergmann, linux-crypto, linux-kernel, Geert Uytterhoeven

On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1):

    crypto/keywrap.c: In function ‘crypto_kw_decrypt’:
    crypto/keywrap.c:191: warning: integer constant is too large for ‘long’ type
    crypto/keywrap.c: In function ‘crypto_kw_encrypt’:
    crypto/keywrap.c:224: warning: integer constant is too large for ‘long’ type

Fixes: 9e49451d7a15365d ("crypto: keywrap - simplify code")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 crypto/keywrap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/keywrap.c b/crypto/keywrap.c
index 744e35134c45f300..ec5c6a087c901501 100644
--- a/crypto/keywrap.c
+++ b/crypto/keywrap.c
@@ -188,7 +188,7 @@ static int crypto_kw_decrypt(struct blkcipher_desc *desc,
 	}
 
 	/* Perform authentication check */
-	if (block.A != cpu_to_be64(0xa6a6a6a6a6a6a6a6))
+	if (block.A != cpu_to_be64(0xa6a6a6a6a6a6a6a6ULL))
 		ret = -EBADMSG;
 
 	memzero_explicit(&block, sizeof(struct crypto_kw_block));
@@ -221,7 +221,7 @@ static int crypto_kw_encrypt(struct blkcipher_desc *desc,
 	 * Place the predefined IV into block A -- for encrypt, the caller
 	 * does not need to provide an IV, but he needs to fetch the final IV.
 	 */
-	block.A = cpu_to_be64(0xa6a6a6a6a6a6a6a6);
+	block.A = cpu_to_be64(0xa6a6a6a6a6a6a6a6ULL);
 
 	/*
 	 * src scatterlist is read-only. dst scatterlist is r/w. During the
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants
  2017-11-15 10:44 [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants Geert Uytterhoeven
@ 2017-11-15 14:26 ` Stephan Mueller
  2017-11-29  6:36 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Stephan Mueller @ 2017-11-15 14:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Herbert Xu, David S . Miller, Arnd Bergmann, linux-crypto, linux-kernel

Am Mittwoch, 15. November 2017, 11:44:28 CET schrieb Geert Uytterhoeven:

Hi Geert,

> On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1):
> 
>     crypto/keywrap.c: In function ‘crypto_kw_decrypt’:
>     crypto/keywrap.c:191: warning: integer constant is too large for ‘long’
> type crypto/keywrap.c: In function ‘crypto_kw_encrypt’:
>     crypto/keywrap.c:224: warning: integer constant is too large for ‘long’
> type
> 
> Fixes: 9e49451d7a15365d ("crypto: keywrap - simplify code")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Thank you

Reviewed-by: Stephan Mueller <smueller@chronox.de>

Ciao
Stephan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants
  2017-11-15 10:44 [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants Geert Uytterhoeven
  2017-11-15 14:26 ` Stephan Mueller
@ 2017-11-29  6:36 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2017-11-29  6:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Stephan Mueller, David S . Miller, Arnd Bergmann, linux-crypto,
	linux-kernel

On Wed, Nov 15, 2017 at 11:44:28AM +0100, Geert Uytterhoeven wrote:
> On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1):
> 
>     crypto/keywrap.c: In function ‘crypto_kw_decrypt’:
>     crypto/keywrap.c:191: warning: integer constant is too large for ‘long’ type
>     crypto/keywrap.c: In function ‘crypto_kw_encrypt’:
>     crypto/keywrap.c:224: warning: integer constant is too large for ‘long’ type
> 
> Fixes: 9e49451d7a15365d ("crypto: keywrap - simplify code")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-29  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-15 10:44 [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants Geert Uytterhoeven
2017-11-15 14:26 ` Stephan Mueller
2017-11-29  6:36 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®