Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: caam - fix warning in APPEND_MATH_IMM_u64

An implicit truncation is done when using a variable of 64 bits
in MATH command:

warning: large integer implicitly truncated to unsigned type [-Woverflow]

Silence the compiler by feeding it with an explicit truncated value.

Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
Signed-off-by: Horia Geant? <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tudor Ambarus and committed by
Herbert Xu
c1f2cd21 62743a41

+1 -1
+1 -1
drivers/crypto/caam/desc_constr.h
··· 367 367 if (upper) \ 368 368 append_u64(desc, data); \ 369 369 else \ 370 - append_u32(desc, data); \ 370 + append_u32(desc, lower_32_bits(data)); \ 371 371 } while (0) 372 372 373 373 #define append_math_add_imm_u64(desc, dest, src0, src1, data) \