Baolin Wang
c492471db9
rtc: Fix overflow when converting time64_t to rtc_time
...
commit 36d46cdb43efea74043e29e2a62b13e9aca31452 upstream.
If we convert one large time values to rtc_time, in the original formula
'days * 86400' can be overflowed in 'unsigned int' type to make the formula
get one incorrect remain seconds value. Thus we can use div_s64_rem()
function to avoid this situation.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27 14:13:55 +09:00
..
2019-03-23 14:35:24 +01:00
2018-12-05 19:41:26 +01:00
2019-02-12 19:46:03 +01:00
2019-02-27 10:08:05 +01:00
2019-03-23 14:35:13 +01:00
2019-03-23 14:35:29 +01:00
2019-03-23 14:35:12 +01:00
2019-03-27 14:13:53 +09:00
2018-12-01 09:42:49 +01:00
2019-02-12 19:46:09 +01:00
2019-03-23 14:35:30 +01:00
2019-03-23 14:35:23 +01:00
2019-03-23 14:35:20 +01:00
2019-03-23 14:35:22 +01:00
2019-02-12 19:46:03 +01:00
2019-03-23 14:35:10 +01:00
2019-03-13 14:03:21 -07:00
2018-11-13 11:15:06 -08:00
2018-09-09 19:55:56 +02:00
2019-03-13 14:03:22 -07:00
2019-02-12 19:45:58 +01:00
2019-03-13 14:03:13 -07:00
2019-03-27 14:13:54 +09:00
2019-02-15 08:09:13 +01:00
2019-01-31 08:13:44 +01:00
2019-02-27 10:08:05 +01:00
2019-03-23 14:35:24 +01:00
2019-03-23 14:35:25 +01:00
2018-12-21 14:13:14 +01:00
2019-03-23 14:35:09 +01:00
2019-03-23 14:35:23 +01:00
2019-03-23 14:35:13 +01:00
2019-03-27 14:13:51 +09:00
2019-03-23 14:35:22 +01:00
2019-02-27 10:08:06 +01:00
2019-02-27 10:08:05 +01:00
2018-11-13 11:14:52 -08:00
2018-09-19 22:43:41 +02:00
2019-03-23 14:35:15 +01:00
2019-03-23 14:35:30 +01:00
2019-03-27 14:13:53 +09:00
2019-02-12 19:46:04 +01:00
2019-02-27 10:08:03 +01:00
2019-03-23 14:35:23 +01:00
2019-03-27 14:13:51 +09:00
2019-02-15 08:09:11 +01:00
2019-03-23 14:35:22 +01:00
2018-12-01 09:42:54 +01:00
2019-03-23 14:35:18 +01:00
2019-02-20 10:20:50 +01:00
2019-01-23 08:09:49 +01:00
2019-03-23 14:35:24 +01:00
2019-03-27 14:13:55 +09:00
2018-11-13 11:14:46 -08:00
2018-10-18 09:16:24 +02:00
2019-02-27 10:08:09 +01:00
2019-03-23 14:35:14 +01:00
2019-03-13 14:03:15 -07:00
2019-03-23 14:35:28 +01:00
2019-02-12 19:45:59 +01:00
2018-09-15 09:45:27 +02:00
2019-03-23 14:35:19 +01:00
2018-12-08 13:03:40 +01:00
2018-11-13 11:15:12 -08:00
2019-03-27 14:13:55 +09:00
2019-03-23 14:35:20 +01:00
2018-12-21 14:13:13 +01:00
2019-03-27 14:13:55 +09:00
2019-03-13 14:03:19 -07:00
2019-03-23 14:35:19 +01:00
2019-03-23 14:35:31 +01:00
2019-03-23 14:35:20 +01:00
2018-11-13 11:15:11 -08:00
2019-03-05 17:58:00 +01:00
2019-03-23 14:35:25 +01:00
2019-02-15 08:09:14 +01:00
2019-03-27 14:13:55 +09:00
2018-10-03 17:00:46 -07:00
2019-03-19 13:13:25 +01:00
2019-02-12 19:46:07 +01:00
2018-10-13 09:27:30 +02:00
2018-11-13 11:15:09 -08:00
2019-02-12 19:46:03 +01:00
2019-02-27 10:08:03 +01:00