From: Xunlei Pang <xlpang@126.com>
To: linux-kernel@vger.kernel.org
Cc: rtc-linux@googlegroups.com,
Alessandro Zummo <a.zummo@towertech.it>,
John Stultz <john.stultz@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org, Xunlei Pang <pang.xunlei@linaro.org>
Subject: [PATCH 1/2] drivers/rtc/interface.c: Change rtc_set_mmss() to use time64_t
Date: Fri, 15 May 2015 17:31:31 +0800 [thread overview]
Message-ID: <1431682292-29732-1-git-send-email-xlpang@126.com> (raw)
From: Xunlei Pang <pang.xunlei@linaro.org>
rtc_set_mmss() uses "unsigned long" as its second parameter which
may have y2038 problem on 32-bit systems.
Change it to use time64_t.
All its call sites will be changed later(there are no problems
leaving these call sites untouched).
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
drivers/rtc/interface.c | 2 +-
include/linux/rtc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index d43ee40..480ee3c 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -90,7 +90,7 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
}
EXPORT_SYMBOL_GPL(rtc_set_time);
-int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs)
+int rtc_set_mmss(struct rtc_device *rtc, time64_t secs)
{
int err;
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 8dcf682..9c3180e 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -161,7 +161,7 @@ extern void devm_rtc_device_unregister(struct device *dev,
extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm);
extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm);
-extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs);
+extern int rtc_set_mmss(struct rtc_device *rtc, time64_t secs);
extern int rtc_set_ntp_time(struct timespec64 now);
int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm);
extern int rtc_read_alarm(struct rtc_device *rtc,
--
1.9.1
next reply other threads:[~2015-05-15 10:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 9:31 Xunlei Pang [this message]
2015-05-15 9:31 ` [PATCH 2/2] sparc: time: Provide update_persistent_clock64() Xunlei Pang
2015-05-15 23:46 ` [PATCH 1/2] drivers/rtc/interface.c: Change rtc_set_mmss() to use time64_t John Stultz
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=1431682292-29732-1-git-send-email-xlpang@126.com \
--to=xlpang@126.com \
--cc=a.zummo@towertech.it \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pang.xunlei@linaro.org \
--cc=rtc-linux@googlegroups.com \
--cc=sparclinux@vger.kernel.org \
/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
all inboxes | Powered by JetHome®