Skip to content

Commit 5fd96c4

Browse files
arndbjohnstultz-work
authored andcommitted
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>
1 parent 071eee4 commit 5fd96c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/time/ntp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static DECLARE_DELAYED_WORK(sync_cmos_work, sync_cmos_clock);
509509
static void sync_cmos_clock(struct work_struct *work)
510510
{
511511
struct timespec64 now;
512-
struct timespec next;
512+
struct timespec64 next;
513513
int fail = 1;
514514

515515
/*
@@ -559,7 +559,7 @@ static void sync_cmos_clock(struct work_struct *work)
559559
next.tv_nsec -= NSEC_PER_SEC;
560560
}
561561
queue_delayed_work(system_power_efficient_wq,
562-
&sync_cmos_work, timespec_to_jiffies(&next));
562+
&sync_cmos_work, timespec64_to_jiffies(&next));
563563
}
564564

565565
void ntp_notify_cmos_timer(void)

0 commit comments

Comments
 (0)