]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: Use 64-bit arithmetic instead of 32-bit
authorGustavo A. R. Silva <gustavoars@kernel.org>
Sun, 11 Apr 2021 13:43:15 +0000 (21:43 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 11 Apr 2021 14:37:56 +0000 (08:37 -0600)
commitaff3cdff79aa16d5828d9a8a3e44dce2ca133069
treeb1bec7cea760039f0403c9488cc58a80a173034b
parentc38ebfb4d154f216d996a9d83a5cef2a0fa7bbd9
bcache: Use 64-bit arithmetic instead of 32-bit

Cast multiple variables to (int64_t) in order to give the compiler
complete information about the proper arithmetic to use. Notice that
these variables are being used in contexts that expect expressions of
type int64_t  (64 bit, signed). And currently, such expressions are
being evaluated using 32-bit arithmetic.

Fixes: fd72aedd3963 ("octeontx2-pf: ethtool fec mode support")
Addresses-Coverity-ID: 1501724 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1501725 ("Unintentional integer overflow")
Addresses-Coverity-ID: 1501726 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20210411134316.80274-7-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/writeback.c