diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-08-14 14:02:57 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-08-27 12:59:56 +0200 |
commit | 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 (patch) | |
tree | edaebd1c0a1d9b6846b5c3a943d89a59cf06ec42 /kernel/time/time.c | |
parent | 5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff) | |
download | blackbird-obmc-linux-976516404ff3fab2a8caa8bd6f5efc1437fed0b8.tar.gz blackbird-obmc-linux-976516404ff3fab2a8caa8bd6f5efc1437fed0b8.zip |
y2038: remove unused time interfaces
After many small patches, at least some of the deprecated interfaces
have no remaining users any more and can be removed:
current_kernel_time
do_settimeofday
get_monotonic_boottime
get_monotonic_boottime64
get_monotonic_coarse
get_monotonic_coarse64
getrawmonotonic64
ktime_get_real_ts
timekeeping_clocktai
timespec_trunc
timespec_valid_strict
time_to_tm
For many of the remaining time functions, we are missing one or
two patches that failed to make it into 4.19, they will be removed
in the following merge window.
The replacement functions for the removed interfaces are documented in
Documentation/core-api/timekeeping.rst.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'kernel/time/time.c')
-rw-r--r-- | kernel/time/time.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/kernel/time/time.c b/kernel/time/time.c index ccdb351277ee..712543011106 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -342,30 +342,6 @@ unsigned int jiffies_to_usecs(const unsigned long j) } EXPORT_SYMBOL(jiffies_to_usecs); -/** - * timespec_trunc - Truncate timespec to a granularity - * @t: Timespec - * @gran: Granularity in ns. - * - * Truncate a timespec to a granularity. Always rounds down. gran must - * not be 0 nor greater than a second (NSEC_PER_SEC, or 10^9 ns). - */ -struct timespec timespec_trunc(struct timespec t, unsigned gran) -{ - /* Avoid division in the common cases 1 ns and 1 s. */ - if (gran == 1) { - /* nothing */ - } else if (gran == NSEC_PER_SEC) { - t.tv_nsec = 0; - } else if (gran > 1 && gran < NSEC_PER_SEC) { - t.tv_nsec -= t.tv_nsec % gran; - } else { - WARN(1, "illegal file time granularity: %u", gran); - } - return t; -} -EXPORT_SYMBOL(timespec_trunc); - /* * mktime64 - Converts date to seconds. * Converts Gregorian date to seconds since 1970-01-01 00:00:00. |