linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] m68k: Remove read_persistent_clock()
@ 2018-04-19  6:22 Baolin Wang
  2018-04-20 15:22 ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Baolin Wang @ 2018-04-19  6:22 UTC (permalink / raw)
  To: geert
  Cc: alexandre.belloni, arnd, broonie, linux-m68k, linux-kernel, baolin.wang

The read_persistent_clock() uses a timespec, which is not year 2038 safe
on 32bit systems. Moreover on m68k architecture, we have implemented generic
RTC drivers that can be used to compensate the system suspend time. So
we can remove the obsolete read_persistent_clock().

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 arch/m68k/kernel/time.c |   16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 97dd4e2..cb386d8 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -71,22 +71,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
 	return IRQ_HANDLED;
 }
 
-void read_persistent_clock(struct timespec *ts)
-{
-	struct rtc_time time;
-	ts->tv_sec = 0;
-	ts->tv_nsec = 0;
-
-	if (mach_hwclk) {
-		mach_hwclk(0, &time);
-
-		if ((time.tm_year += 1900) < 1970)
-			time.tm_year += 100;
-		ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
-				      time.tm_hour, time.tm_min, time.tm_sec);
-	}
-}
-
 #if defined(CONFIG_ARCH_USES_GETTIMEOFFSET) && IS_ENABLED(CONFIG_RTC_DRV_GENERIC)
 static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
 {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-23 12:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19  6:22 [PATCH] m68k: Remove read_persistent_clock() Baolin Wang
2018-04-20 15:22 ` Arnd Bergmann
2018-04-23  2:08   ` Baolin Wang
2018-04-23  9:07     ` Geert Uytterhoeven
2018-04-23 10:31       ` Baolin Wang
2018-04-23  9:07   ` Geert Uytterhoeven
2018-04-23  9:28     ` Arnd Bergmann
2018-04-23  9:47       ` Geert Uytterhoeven
2018-04-23 11:47         ` Arnd Bergmann
2018-04-23 12:44           ` Greg Ungerer
2018-04-23 10:04       ` Alexandre Belloni

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).