aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-10-19 07:14:46 -0400
committerJohn Stultz <john.stultz@linaro.org>2017-10-30 18:14:18 -0400
commit85bf19e7df2479140eff2348a4e6a9c19b5c3960 (patch)
treeb5ef52ee878be4e5093c4893b4fc6134ada157f4 /include/linux/time.h
parent1572fa03784831b81ec26ec379374cf6bdec04fb (diff)
time: Remove unused functions
The (slow but) ongoing work on conversion from timespec to timespec64 has led some timespec based helper functions to become unused. No new code should use them, so we can remove the functions entirely. I'm planning to obsolete additional interfaces next and remove more of these. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Miroslav Lichvar <mlichvar@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index c0fbad08448f..0e8a80918484 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -39,15 +39,6 @@ static inline int timespec_compare(const struct timespec *lhs, const struct time
39 return lhs->tv_nsec - rhs->tv_nsec; 39 return lhs->tv_nsec - rhs->tv_nsec;
40} 40}
41 41
42static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs)
43{
44 if (lhs->tv_sec < rhs->tv_sec)
45 return -1;
46 if (lhs->tv_sec > rhs->tv_sec)
47 return 1;
48 return lhs->tv_usec - rhs->tv_usec;
49}
50
51extern time64_t mktime64(const unsigned int year, const unsigned int mon, 42extern time64_t mktime64(const unsigned int year, const unsigned int mon,
52 const unsigned int day, const unsigned int hour, 43 const unsigned int day, const unsigned int hour,
53 const unsigned int min, const unsigned int sec); 44 const unsigned int min, const unsigned int sec);
@@ -65,15 +56,6 @@ static inline unsigned long mktime(const unsigned int year,
65 56
66extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); 57extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec);
67 58
68/*
69 * timespec_add_safe assumes both values are positive and checks
70 * for overflow. It will return TIME_T_MAX if the reutrn would be
71 * smaller then either of the arguments.
72 */
73extern struct timespec timespec_add_safe(const struct timespec lhs,
74 const struct timespec rhs);
75
76
77static inline struct timespec timespec_add(struct timespec lhs, 59static inline struct timespec timespec_add(struct timespec lhs,
78 struct timespec rhs) 60 struct timespec rhs)
79{ 61{