From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] bnxt: fix bnxt_hwrm_fw_set_time for y2038 Date: Wed, 08 Nov 2017 13:44:21 +0900 (KST) Message-ID: <20171108.134421.1202222154886319559.davem@davemloft.net> References: <20171106140448.1551781-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: michael.chan@broadcom.com, jiri@mellanox.com, sathya.perla@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: arnd@arndb.de Return-path: In-Reply-To: <20171106140448.1551781-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Arnd Bergmann Date: Mon, 6 Nov 2017 15:04:39 +0100 > 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 Applied, thanks Arnd. The RTC_LIB dependency should have been done via KConfig anyways.