public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rodolfo Giometti <giometti@enneenne.com>,
	linux-net-drivers@solarflare.com,
	Shradha Shah <sshah@solarflare.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 3/5] ntp: use timespec64 in sync_cmos_clock
Date: Mon, 28 Sep 2015 22:21:30 +0200	[thread overview]
Message-ID: <1443471692-2946597-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1443471692-2946597-1-git-send-email-arnd@arndb.de>

The sync_cmos_clock has one use of struct timespec, which we want to
eventually replace with timespec64 or similar in the kernel. There
is no way this one can overflow, but the conversion to timespec64
is trivial and has no other dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/time/ntp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index bd4fa6271262..149cc8086aea 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -509,7 +509,7 @@ static DECLARE_DELAYED_WORK(sync_cmos_work, sync_cmos_clock);
 static void sync_cmos_clock(struct work_struct *work)
 {
 	struct timespec64 now;
-	struct timespec next;
+	struct timespec64 next;
 	int fail = 1;
 
 	/*
@@ -559,7 +559,7 @@ static void sync_cmos_clock(struct work_struct *work)
 		next.tv_nsec -= NSEC_PER_SEC;
 	}
 	queue_delayed_work(system_power_efficient_wq,
-			   &sync_cmos_work, timespec_to_jiffies(&next));
+			   &sync_cmos_work, timespec64_to_jiffies(&next));
 }
 
 void ntp_notify_cmos_timer(void)
-- 
2.1.0.rc2


  parent reply	other threads:[~2015-09-28 20:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 20:21 [PATCH 0/5] y2038 conversion for ntp/pps and sfc driver Arnd Bergmann
2015-09-28 20:21 ` [PATCH 1/5] ntp/pps: use timespec64 for hardpps() Arnd Bergmann
2015-09-30  7:20   ` Thomas Gleixner
2015-09-28 20:21 ` [PATCH 2/5] ntp/pps: replace getnstime_raw_and_real with 64-bit version Arnd Bergmann
2015-09-30  7:20   ` Thomas Gleixner
2015-09-28 20:21 ` Arnd Bergmann [this message]
2015-09-30  7:22   ` [PATCH 3/5] ntp: use timespec64 in sync_cmos_clock Thomas Gleixner
2015-09-28 20:21 ` [PATCH 4/5] ntp/pps: use y2038 safe types in pps_event_time Arnd Bergmann
2015-09-30  7:25   ` Thomas Gleixner
2015-09-28 20:21 ` [PATCH 5/5] net: sfc: avoid using timespec Arnd Bergmann
2015-09-30  7:26   ` Thomas Gleixner
2015-09-29 19:17 ` [PATCH 0/5] y2038 conversion for ntp/pps and sfc driver Richard Cochran
2015-09-30  4:06 ` David Miller
2015-09-30  7:27   ` Thomas Gleixner
2015-10-01 17:00     ` 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=1443471692-2946597-4-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=giometti@enneenne.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=sshah@solarflare.com \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.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