Commit 7dfaa7b
bnxt: fix bnxt_hwrm_fw_set_time for y2038
On 32-bit architectures, rtc_time_to_tm() returns incorrect results
in 2038 or later, and do_gettimeofday() is broken for the same reason.
This changes the code to use ktime_get_real_seconds() and time64_to_tm()
instead, both of them are 2038-safe, and we can also get rid of the
CONFIG_RTC_LIB dependency that way.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 96c623e commit 7dfaa7b
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4915 | 4915 | | |
4916 | 4916 | | |
4917 | 4917 | | |
4918 | | - | |
4919 | 4918 | | |
4920 | | - | |
4921 | | - | |
| 4919 | + | |
| 4920 | + | |
4922 | 4921 | | |
4923 | 4922 | | |
4924 | 4923 | | |
4925 | 4924 | | |
4926 | | - | |
4927 | | - | |
| 4925 | + | |
4928 | 4926 | | |
4929 | 4927 | | |
4930 | 4928 | | |
| |||
4933 | 4931 | | |
4934 | 4932 | | |
4935 | 4933 | | |
4936 | | - | |
4937 | | - | |
4938 | | - | |
4939 | 4934 | | |
4940 | 4935 | | |
4941 | 4936 | | |
| |||
0 commit comments