git: 95ea57c85639 - main - LinnuxKPI: drm2: retire timespec_to_jiffies()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 01 Feb 2025 00:49:32 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=95ea57c856392e2824d9c5b68ac912066e7fde36 commit 95ea57c856392e2824d9c5b68ac912066e7fde36 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-01-07 19:57:41 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-02-01 00:47:30 +0000 LinnuxKPI: drm2: retire timespec_to_jiffies() Linux has removed timespec_to_jiffies() half a decade ago [1]. I cannot find any use of it anymore in recent drm-kmod branches or in the tree so retire it. While here also retire it from drm2. Reported by: emaste (D48318) [1]. Sponsored by: The freeBSD Foundation MFC after: 2 weeks Reviewed by: emaste, dumbbell (tested all drm-kmod versions, thanks!) Differential Revision: https://reviews.freebsd.org/D48379 --- sys/compat/linuxkpi/common/include/linux/jiffies.h | 13 ------------- sys/dev/drm2/drm_os_freebsd.h | 1 - 2 files changed, 14 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/jiffies.h b/sys/compat/linuxkpi/common/include/linux/jiffies.h index bd05a0db0767..f099caa1ce18 100644 --- a/sys/compat/linuxkpi/common/include/linux/jiffies.h +++ b/sys/compat/linuxkpi/common/include/linux/jiffies.h @@ -68,19 +68,6 @@ extern uint64_t lkpi_msec2hz_rem; extern uint64_t lkpi_msec2hz_div; extern uint64_t lkpi_msec2hz_max; -static inline int -timespec_to_jiffies(const struct timespec *ts) -{ - u64 result; - - result = ((u64)hz * ts->tv_sec) + - (((u64)hz * ts->tv_nsec + NSEC_PER_SEC - 1) / NSEC_PER_SEC); - if (result > MAX_JIFFY_OFFSET) - result = MAX_JIFFY_OFFSET; - - return ((int)result); -} - static inline int msecs_to_jiffies(uint64_t msec) { diff --git a/sys/dev/drm2/drm_os_freebsd.h b/sys/dev/drm2/drm_os_freebsd.h index b2a2e82b748b..71a9637ddd9f 100644 --- a/sys/dev/drm2/drm_os_freebsd.h +++ b/sys/dev/drm2/drm_os_freebsd.h @@ -447,7 +447,6 @@ extern unsigned long drm_linux_timer_hz_mask; #define jiffies ticks #define jiffies_to_msecs(x) (((int64_t)(x)) * 1000 / hz) #define msecs_to_jiffies(x) (((int64_t)(x)) * hz / 1000) -#define timespec_to_jiffies(x) (((x)->tv_sec * 1000000 + (x)->tv_nsec) * hz / 1000000) #define time_after(a,b) ((long)(b) - (long)(a) < 0) #define time_after_eq(a,b) ((long)(b) - (long)(a) <= 0) #define round_jiffies(j) ((unsigned long)(((j) + drm_linux_timer_hz_mask) & ~drm_linux_timer_hz_mask))