diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-02 11:01:22 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-02 11:01:22 +0000 |
commit | 172076ef8d267cf7290426bd3af5b2e518e658d1 (patch) | |
tree | cdb7776ac1a894bd543ae953389eb66665b918f4 /sys/dev/pci/drm/include | |
parent | 1f16b75deb18ac019eaeb49edd7023bd9ff10b7a (diff) |
remove unused timespec interfaces no longer in linux
Diffstat (limited to 'sys/dev/pci/drm/include')
-rw-r--r-- | sys/dev/pci/drm/include/linux/time.h | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/sys/dev/pci/drm/include/linux/time.h b/sys/dev/pci/drm/include/linux/time.h index 0719b8fce65..ec764e28a4a 100644 --- a/sys/dev/pci/drm/include/linux/time.h +++ b/sys/dev/pci/drm/include/linux/time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: time.h,v 1.2 2020/06/08 04:48:15 jsg Exp $ */ +/* $OpenBSD: time.h,v 1.3 2020/07/02 11:01:21 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * @@ -29,7 +29,6 @@ #define USEC_PER_MSEC 1000L #define USEC_PER_SEC 1000000L -extern struct timespec ns_to_timespec(const int64_t); extern int64_t timeval_to_ms(const struct timeval *); extern int64_t timeval_to_ns(const struct timeval *); extern int64_t timeval_to_us(const struct timeval *); @@ -40,40 +39,4 @@ struct timespec64 { long tv_nsec; }; -static inline struct timespec -timespec_sub(struct timespec t1, struct timespec t2) -{ - struct timespec diff; - - timespecsub(&t1, &t2, &diff); - return diff; -} - -static inline void -set_normalized_timespec(struct timespec *ts, time_t sec, int64_t nsec) -{ - while (nsec > NSEC_PER_SEC) { - nsec -= NSEC_PER_SEC; - sec++; - } - - ts->tv_sec = sec; - ts->tv_nsec = nsec; -} - -static inline int64_t -timespec_to_ns(const struct timespec *ts) -{ - return ((ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec); -} - -static inline int -timespec_valid(const struct timespec *ts) -{ - if (ts->tv_sec < 0 || ts->tv_sec > 100000000 || - ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) - return (0); - return (1); -} - #endif |