]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
timekeeping: remove unused {read,update}_persistent_clock
authorArnd Bergmann <arnd@arndb.de>
Tue, 14 Aug 2018 12:15:23 +0000 (14:15 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 18 Dec 2018 15:13:05 +0000 (16:13 +0100)
After arch/sh has removed the last reference to these functions,
we can remove them completely and just rely on the 64-bit time_t
based versions. This cleans up a rather ugly use of __weak
functions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: John Stultz <john.stultz@linaro.org>
include/linux/timekeeping32.h
kernel/time/ntp.c
kernel/time/timekeeping.c

index a502616f7e1c517e057682a45b80dad433c36a29..0036ff314ac531a6f629ada9764ca408661d4439 100644 (file)
@@ -52,10 +52,4 @@ static inline void getboottime(struct timespec *ts)
        *ts = timespec64_to_timespec(ts64);
 }
 
-/*
- * Persistent clock related interfaces
- */
-extern void read_persistent_clock(struct timespec *ts);
-extern int update_persistent_clock(struct timespec now);
-
 #endif
index c5e0cba3b39cc12c5b6ef2f12c04395123e999c6..e23be418d015737476f0842bbb0522cb81e43474 100644 (file)
@@ -555,17 +555,9 @@ static void sync_rtc_clock(void)
 }
 
 #ifdef CONFIG_GENERIC_CMOS_UPDATE
-int __weak update_persistent_clock(struct timespec now)
-{
-       return -ENODEV;
-}
-
 int __weak update_persistent_clock64(struct timespec64 now64)
 {
-       struct timespec now;
-
-       now = timespec64_to_timespec(now64);
-       return update_persistent_clock(now);
+       return -ENODEV;
 }
 #endif
 
index 2d110c948805560c097939cab4456e3e9dad358a..eb09be4871b30bb201dd407b55d401bf8a61c510 100644 (file)
@@ -1467,7 +1467,7 @@ u64 timekeeping_max_deferment(void)
 }
 
 /**
- * read_persistent_clock -  Return time from the persistent clock.
+ * read_persistent_clock64 -  Return time from the persistent clock.
  *
  * Weak dummy function for arches that do not yet support it.
  * Reads the time from the battery backed persistent clock.
@@ -1475,20 +1475,12 @@ u64 timekeeping_max_deferment(void)
  *
  *  XXX - Do be sure to remove it once all arches implement it.
  */
-void __weak read_persistent_clock(struct timespec *ts)
+void __weak read_persistent_clock64(struct timespec64 *ts)
 {
        ts->tv_sec = 0;
        ts->tv_nsec = 0;
 }
 
-void __weak read_persistent_clock64(struct timespec64 *ts64)
-{
-       struct timespec ts;
-
-       read_persistent_clock(&ts);
-       *ts64 = timespec_to_timespec64(ts);
-}
-
 /**
  * read_persistent_wall_and_boot_offset - Read persistent clock, and also offset
  *                                        from the boot.