Gustavo A. R. Silva
54498e8070
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 <David.Laight@ACULAB.COM>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2020-02-13 09:29:30 +01:00
..
2020-02-07 12:51:54 -08:00
2020-01-29 18:53:37 -08:00
2020-02-06 06:11:50 +00:00
2020-01-28 16:02:33 -08:00
2020-02-08 14:04:19 -08:00
2020-01-28 16:02:33 -08:00
2020-02-08 13:26:41 -08:00
2020-01-24 19:57:53 +01:00
2020-02-08 14:04:19 -08:00
2020-02-04 03:05:27 +00:00
2020-02-08 14:17:27 -08:00
2020-02-08 14:17:27 -08:00
2020-02-08 14:04:19 -08:00
2020-02-08 14:04:19 -08:00
2020-01-28 16:02:33 -08:00
2020-02-08 13:58:44 -08:00
2020-01-27 13:03:00 -08:00
2020-02-08 14:04:19 -08:00
2020-02-04 03:05:27 +00:00
2020-02-09 16:05:50 -08:00
2020-01-30 08:04:01 -08:00
2020-02-03 14:42:03 +00:00
2020-02-08 14:04:19 -08:00
2020-01-21 16:16:36 -08:00
2020-02-13 09:29:30 +01:00
2020-02-04 03:05:26 +00:00
2020-02-03 11:57:18 +01:00
2020-02-04 07:17:41 +00:00
2020-01-31 14:40:36 -08:00
2020-02-04 07:24:48 +00:00
2020-02-05 17:49:54 +00:00
2020-02-09 15:47:37 -08:00
2020-02-04 03:05:26 +00:00
2020-01-22 21:08:24 +01:00
2020-02-04 13:06:46 +00:00
2020-02-08 13:04:49 -08:00
2020-02-04 07:17:41 +00:00
2020-01-19 22:10:04 +01:00
2020-02-04 07:17:41 +00:00
2020-02-07 12:54:13 -08:00
2020-01-27 13:03:00 -08:00
2020-02-04 03:05:27 +00:00
2020-02-08 17:15:08 -08:00
2020-01-19 22:10:04 +01:00
2020-01-31 10:30:37 -08:00
2020-02-06 06:15:23 +00:00
2020-02-07 12:54:13 -08:00
2020-02-08 14:04:19 -08:00
2020-01-27 13:03:00 -08:00
2020-02-04 03:05:26 +00:00
2020-02-06 14:17:38 +00:00
2020-02-04 03:05:27 +00:00
2020-02-04 03:05:24 +00:00
2020-02-04 07:24:48 +00:00
2020-02-04 03:05:26 +00:00
2020-02-08 13:55:25 -08:00
2020-01-19 22:10:04 +01:00
2020-01-20 15:40:49 +01:00
2020-02-03 14:51:57 +00:00
2020-01-24 09:34:07 -08:00
2020-01-20 10:29:56 -08:00
2020-02-04 07:17:41 +00:00
2020-02-05 17:33:35 +00:00
2020-02-08 17:24:41 -08:00
2020-02-08 14:04:19 -08:00
2020-02-04 03:05:27 +00:00
2020-02-04 03:05:26 +00:00
2020-01-29 18:16:16 -08:00
2020-01-31 11:28:31 -08:00
2020-02-08 14:04:19 -08:00
2020-01-31 14:39:21 -08:00
2020-02-09 16:05:50 -08:00
2020-02-08 13:26:41 -08:00
2020-02-03 22:22:05 +00:00
2020-02-09 16:05:50 -08:00
2020-02-06 03:40:27 -05:00
2020-01-29 10:35:54 -08:00
2020-01-29 10:35:54 -08:00
2020-02-07 12:30:16 -08:00
2020-02-05 17:44:14 +00:00
2020-02-09 16:05:50 -08:00