]> git.baikalelectronics.ru Git - kernel.git/commitdiff
crypto: caam - fix warning in APPEND_MATH_IMM_u64
authorTudor Ambarus <tudor.ambarus@freescale.com>
Fri, 17 Jul 2015 13:54:54 +0000 (16:54 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 20 Jul 2015 07:53:43 +0000 (15:53 +0800)
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>
drivers/crypto/caam/desc_constr.h

index 9f79fd7bd4d7d1b7589a2facdc15e7667dbb8d48..98d07de24fc48c975faf1e13e65d248cc48edd90 100644 (file)
@@ -367,7 +367,7 @@ do { \
        if (upper) \
                append_u64(desc, data); \
        else \
-               append_u32(desc, data); \
+               append_u32(desc, lower_32_bits(data)); \
 } while (0)
 
 #define append_math_add_imm_u64(desc, dest, src0, src1, data) \