linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
To: geert@linux-m68k.org
Cc: alexandre.belloni@bootlin.com, arnd@arndb.de, broonie@kernel.org,
	linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org,
	baolin.wang@linaro.org
Subject: [PATCH] m68k: Remove read_persistent_clock()
Date: Thu, 19 Apr 2018 14:22:20 +0800	[thread overview]
Message-ID: <0ca46228311ec615947e199def9fed62d70c1f07.1524118799.git.baolin.wang@linaro.org> (raw)

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

             reply	other threads:[~2018-04-19  6:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  6:22 Baolin Wang [this message]
2018-04-20 15:22 ` [PATCH] m68k: Remove read_persistent_clock() 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

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=0ca46228311ec615947e199def9fed62d70c1f07.1524118799.git.baolin.wang@linaro.org \
    --to=baolin.wang@linaro.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@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;
as well as URLs for NNTP newsgroup(s).