aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorGustavo A. R. Silva <[email protected]>2020-02-11 14:47:04 +0000
committerWolfram Sang <[email protected]>2020-02-13 08:29:30 +0000
commit54498e8070e19e74498a72c7331348143e7e1f8c (patch)
treeb5e98b1662093294b2a64a93b641ed909e36dda5 /tools/perf/scripts/python/check-perf-trace.py
parenti2c: jz4780: silence log flood on txabrt (diff)
downloadkernel-54498e8070e19e74498a72c7331348143e7e1f8c.tar.gz
kernel-54498e8070e19e74498a72c7331348143e7e1f8c.zip
i2c: altera: Fix potential integer overflow
Factor out 100 from the equation and do 32-bit arithmetic (3 * clk_mhz / 10) instead of 64-bit. Notice that clk_mhz is MHz, so the multiplication will never wrap 32 bits and there is no need for div_u64(). Addresses-Coverity: 1458369 ("Unintentional integer overflow") Fixes: 0560ad576268 ("i2c: altera: Add Altera I2C Controller driver") Suggested-by: David Laight <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Thor Thayer <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions