Skip to content

Commit

Permalink
crypto: keywrap - Add missing ULL suffixes for 64-bit constants
Browse files Browse the repository at this point in the history
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: 9e49451 ("crypto: keywrap - simplify code")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Stephan Mueller <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
geertu authored and herbertx committed Nov 29, 2017
1 parent 5601e01 commit c968327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/keywrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c968327

Please sign in to comment.