提交 c9683276 编写于 作者: G Geert Uytterhoeven 提交者: Herbert Xu

crypto: keywrap - Add missing ULL suffixes for 64-bit constants

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: 9e49451d ("crypto: keywrap - simplify code")
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: NStephan Mueller <smueller@chronox.de>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 5601e014
...@@ -188,7 +188,7 @@ static int crypto_kw_decrypt(struct blkcipher_desc *desc, ...@@ -188,7 +188,7 @@ static int crypto_kw_decrypt(struct blkcipher_desc *desc,
} }
/* Perform authentication check */ /* Perform authentication check */
if (block.A != cpu_to_be64(0xa6a6a6a6a6a6a6a6)) if (block.A != cpu_to_be64(0xa6a6a6a6a6a6a6a6ULL))
ret = -EBADMSG; ret = -EBADMSG;
memzero_explicit(&block, sizeof(struct crypto_kw_block)); memzero_explicit(&block, sizeof(struct crypto_kw_block));
...@@ -221,7 +221,7 @@ static int crypto_kw_encrypt(struct blkcipher_desc *desc, ...@@ -221,7 +221,7 @@ static int crypto_kw_encrypt(struct blkcipher_desc *desc,
* Place the predefined IV into block A -- for encrypt, the caller * 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. * 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 * src scatterlist is read-only. dst scatterlist is r/w. During the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册