]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: chtls - use 64-bit arithmetic instead of 32-bit
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 4 Jul 2018 16:37:20 +0000 (11:37 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jul 2018 10:26:49 +0000 (18:26 +0800)
commit45a6264014533cee67aa2a4d8f0ed9e0fcfed6fd
treeb35a052ee1c34f1c2206ceeca8e067420cf52d54
parent25720d4352c24784dc06f017389ec0cec7a87643
crypto: chtls - use 64-bit arithmetic instead of 32-bit

Cast *val* to u64 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such variable is used in a context that expects an
expression of type u64 (64 bits, unsigned) and the following
expression is currently being evaluated using 32-bit arithmetic:

val << bit_pos

Addresses-Coverity-ID: 1467425 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/chelsio/chtls/chtls_hw.c