Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ntp: use timespec64 in sync_cmos_clock

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.

Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>

authored by

Arnd Bergmann and committed by
John Stultz
5fd96c42 071eee45

+2 -2
+2 -2
kernel/time/ntp.c
··· 509 509 static void sync_cmos_clock(struct work_struct *work) 510 510 { 511 511 struct timespec64 now; 512 - struct timespec next; 512 + struct timespec64 next; 513 513 int fail = 1; 514 514 515 515 /* ··· 559 559 next.tv_nsec -= NSEC_PER_SEC; 560 560 } 561 561 queue_delayed_work(system_power_efficient_wq, 562 - &sync_cmos_work, timespec_to_jiffies(&next)); 562 + &sync_cmos_work, timespec64_to_jiffies(&next)); 563 563 } 564 564 565 565 void ntp_notify_cmos_timer(void)