um: Remove unused timeval_to_ns() function
PATCH 1/1 um: Remove unused timeval_to_ns() function
The timeval_to_ns() function doesn't appear to be used anywhere, as far as I (or git grep) can tell, and clang throws up a warning about it:
../arch/um/os-Linux/time.c:21:25: warning: unused function 'timeval_to_ns' [-Wunused-function] static inline long long timeval_to_ns(const struct timeval *tv)
^
1 warning generated.
---
Warning can be reproduced under clang 13.0.1-+rc1 after applying:
um: Allow builds with Clang -- https://lkml.org/lkml/2022/2/24/40
arch/um/os-Linux/time.c | 6 ------ 1 file changed, 6 deletions(-)
arch/um/os-Linux/time.c +0 -6
@@ -18,12 +18,6 @@static timer_t event_high_res_timer =0 ; -static inline long long timeval_to_ns (const struct timeval *tv) -{ -return ((long long ) tv->tv_sec *UM_NSEC_PER_SEC ) + - tv->tv_usec *UM_NSEC_PER_USEC ; -} -static inline long long timespec_to_ns (const struct timespec *ts) {return ((long long ) ts->tv_sec *UM_NSEC_PER_SEC ) + ts->tv_nsec;
Signature · 1 line
2.35.1.473.g83b2b277ed-goog
Quoted 5 lines · David Gow
The
timeval_to_ns()function doesn't appear to be used anywhere, as far as I (or git grep) can tell, and clang throws up a warning about it:
../arch/um/os-Linux/time.c:21:25: warning: unused function 'timeval_to_ns' [-Wunused-function] static inline long longtimeval_to_ns(const struct timeval *tv)
Correct. Leftovers from the days when the timers subsystem was based on itimer_*() instead of POSIX timers.
Quoted 20 lines
^1 warning generated.
Signed-off-by David Gow <[email protected]>---
Warning can be reproduced under clang 13.0.1-+rc1 after applying:
um: Allow builds with Clang -- https://lkml.org/lkml/2022/2/24/40arch/um/os-Linux/time.c | 6 ------ 1 file changed, 6 deletions(-)arch/um/os-Linux/time.c +0
-0@@ -18,12 +18,6 @@static timer_t event_high_res_timer =0 ;
arch/um/os-Linux/time.c line 23
Quoted 10 lines
arch/um/os-Linux/time.c +0
-6-static inline long long timeval_to_ns (const struct timeval *tv) -{ -return ((long long ) tv->tv_sec *UM_NSEC_PER_SEC ) + - tv->tv_usec *UM_NSEC_PER_USEC ; -} -static inline long long timespec_to_ns (const struct timespec *ts) {return ((long long ) ts->tv_sec *UM_NSEC_PER_SEC ) + ts->tv_nsec;
Signature · 8 lines
Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/ _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um