Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670548 > unrolled thread
| Started by | Benjamin Gaignard <benjamin.gaignard@linaro.org> |
|---|---|
| First post | 2017-06-20 11:40 +0200 |
| Last post | 2017-06-20 14:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 51/51] power: suspend test: stop using rtc deprecated functions Benjamin Gaignard <benjamin.gaignard@linaro.org> - 2017-06-20 11:40 +0200
Re: [PATCH 51/51] power: suspend test: stop using rtc deprecated functions Pavel Machek <pavel@ucw.cz> - 2017-06-20 14:20 +0200
| From | Benjamin Gaignard <benjamin.gaignard@linaro.org> |
|---|---|
| Date | 2017-06-20 11:40 +0200 |
| Subject | [PATCH 51/51] power: suspend test: stop using rtc deprecated functions |
| Message-ID | <tUnNF-6PZ-45@gated-at.bofh.it> |
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. Stop using those two functions to safer 64bits ones. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> CC: "Rafael J. Wysocki" <rjw@rjwysocki.net> CC: Pavel Machek <pavel@ucw.cz> CC: Len Brown <len.brown@intel.com> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@free-electrons.com> CC: rtc-linux@googlegroups.com CC: linux-pm@vger.kernel.org CC: linux-kernel@vger.kernel.org --- kernel/power/suspend_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c index 5db2170..334a893 100644 --- a/kernel/power/suspend_test.c +++ b/kernel/power/suspend_test.c @@ -71,7 +71,7 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state) static char info_test[] __initdata = KERN_INFO "PM: test RTC wakeup from '%s' suspend\n"; - unsigned long now; + unsigned long long now; struct rtc_wkalrm alm; int status; @@ -82,10 +82,10 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state) printk(err_readtime, dev_name(&rtc->dev), status); return; } - rtc_tm_to_time(&alm.time, &now); + now = rtc_tm_to_time64(&alm.time); memset(&alm, 0, sizeof alm); - rtc_time_to_tm(now + TEST_SUSPEND_SECONDS, &alm.time); + rtc_time64_to_tm(now + TEST_SUSPEND_SECONDS, &alm.time); alm.enabled = true; status = rtc_set_alarm(rtc, &alm); -- 1.9.1
[toc] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-06-20 14:20 +0200 |
| Subject | Re: [PATCH 51/51] power: suspend test: stop using rtc deprecated functions |
| Message-ID | <tUqiu-8w4-25@gated-at.bofh.it> |
| In reply to | #1670548 |
[Multipart message — attachments visible in raw view] — view raw
On Tue 2017-06-20 11:35:59, Benjamin Gaignard wrote: > 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. > Stop using those two functions to safer 64bits ones. > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> > CC: "Rafael J. Wysocki" <rjw@rjwysocki.net> Acked-by: Pavel Machek <pavel@ucw.cz> -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web