OSDN Git Service

ASoC: fsl_spdif: Use 64-bit arithmetic instead of 32-bit
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 4 Jul 2018 14:18:33 +0000 (09:18 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 5 Jul 2018 10:07:59 +0000 (11:07 +0100)
commitb999a7a9e72bd2d37b5d03772cedfc4dd45875bf
treebda601c8b833faf563cc2a40b733c0ac217c09c2
parentf1478a1476d45c5d7b070c726f46a7b581d3103c
ASoC: fsl_spdif: Use 64-bit arithmetic instead of 32-bit

Add suffix ULL to constant 64 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such constant 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:

rate[index] * txclk_df * 64

Addresses-Coverity-ID: 1222129 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_spdif.c