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-02-12 19:46:03 +01:00
2019-02-12 19:46:09 +01:00
2019-03-23 14:35:25 +01:00
2018-12-21 14:13:14 +01:00
2019-03-27 14:13:51 +09:00
2018-09-15 09:45:27 +02:00
2018-12-21 14:13:13 +01:00
2018-11-13 11:15:11 -08:00
2018-10-03 17:00:46 -07:00