Browse Source

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>
Tudor Ambarus 10 years ago
parent
commit
c1f2cd21ed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/crypto/caam/desc_constr.h

+ 1 - 1
drivers/crypto/caam/desc_constr.h

@@ -367,7 +367,7 @@ do { \
 	if (upper) \
 	if (upper) \
 		append_u64(desc, data); \
 		append_u64(desc, data); \
 	else \
 	else \
-		append_u32(desc, data); \
+		append_u32(desc, lower_32_bits(data)); \
 } while (0)
 } while (0)
 
 
 #define append_math_add_imm_u64(desc, dest, src0, src1, data) \
 #define append_math_add_imm_u64(desc, dest, src0, src1, data) \