From: tip-bot for Benjamin Gaignard <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, arnd@arndb.de, mingo@kernel.org,
mlichvar@redhat.com, linux-kernel@vger.kernel.org,
prarit@redhat.com, richardcochran@gmail.com,
benjamin.gaignard@linaro.org,
alexandre.belloni@free-electrons.com, stephen.boyd@linaro.org,
john.stultz@linaro.org, hpa@zytor.com
Subject: [tip:x86/cleanups] x86/rtc: Stop using deprecated functions
Date: Thu, 15 Mar 2018 01:52:34 -0700 [thread overview]
Message-ID: <tip-13cc36d76bc4f5a9801ae32630bc8240ba0cc522@git.kernel.org> (raw)
In-Reply-To: <1520620971-9567-5-git-send-email-john.stultz@linaro.org>
Commit-ID: 13cc36d76bc4f5a9801ae32630bc8240ba0cc522
Gitweb: https://git.kernel.org/tip/13cc36d76bc4f5a9801ae32630bc8240ba0cc522
Author: Benjamin Gaignard <benjamin.gaignard@linaro.org>
AuthorDate: Fri, 9 Mar 2018 10:42:50 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 15 Mar 2018 09:47:24 +0100
x86/rtc: Stop using deprecated functions
rtc_time_to_tm() and rtc_tm_to_time() are deprecated because they
rely on 32bits variables and that will make rtc break in y2038/2016.
Use the proper y2038 safe functions.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Link: https://lkml.kernel.org/r/1520620971-9567-5-git-send-email-john.stultz@linaro.org
---
arch/x86/kernel/rtc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index 69ac9cb9cac6..f7b82ed7b5b5 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -41,11 +41,11 @@ EXPORT_SYMBOL(rtc_lock);
*/
int mach_set_rtc_mmss(const struct timespec *now)
{
- unsigned long nowtime = now->tv_sec;
+ unsigned long long nowtime = now->tv_sec;
struct rtc_time tm;
int retval = 0;
- rtc_time_to_tm(nowtime, &tm);
+ rtc_time64_to_tm(nowtime, &tm);
if (!rtc_valid_tm(&tm)) {
retval = mc146818_set_time(&tm);
if (retval)
@@ -53,7 +53,7 @@ int mach_set_rtc_mmss(const struct timespec *now)
__func__, retval);
} else {
printk(KERN_ERR
- "%s: Invalid RTC value: write of %lx to RTC failed\n",
+ "%s: Invalid RTC value: write of %llx to RTC failed\n",
__func__, nowtime);
retval = -EINVAL;
}
prev parent reply other threads:[~2018-03-15 8:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 18:42 [GIT PULL][PATCH 0/4] Timekeeping queue for 4.17 John Stultz
2018-03-09 18:42 ` [PATCH 1/4] timekeeping: Don't align frequency adjustments to ticks John Stultz
2018-03-10 9:12 ` [tip:timers/core] timekeeping/ntp: Don't align NTP " tip-bot for Miroslav Lichvar
2018-03-09 18:42 ` [PATCH 2/4] timekeeping: Determine multiplier directly from NTP tick length John Stultz
2018-03-10 9:13 ` [tip:timers/core] timekeeping/ntp: Determine the " tip-bot for Miroslav Lichvar
2018-03-09 18:42 ` [PATCH 3/4] y2038: time: Introduce struct __kernel_old_timeval John Stultz
2018-03-10 8:11 ` Ingo Molnar
2018-03-14 22:02 ` Arnd Bergmann
2018-03-14 22:04 ` [PATCH] [v2] y2038: introduce " Arnd Bergmann
2018-03-15 8:44 ` Thomas Gleixner
2018-03-15 15:46 ` Arnd Bergmann
2018-03-09 18:42 ` [PATCH 4/4] x86: rtc: Stop using rtc deprecated functions John Stultz
2018-03-15 8:52 ` tip-bot for Benjamin Gaignard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-13cc36d76bc4f5a9801ae32630bc8240ba0cc522@git.kernel.org \
--to=tipbot@zytor.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=arnd@arndb.de \
--cc=benjamin.gaignard@linaro.org \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mlichvar@redhat.com \
--cc=prarit@redhat.com \
--cc=richardcochran@gmail.com \
--cc=stephen.boyd@linaro.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).