The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5cb64a1d3fe75526fb879ef4dce5860bbb4e4aea

commit 5cb64a1d3fe75526fb879ef4dce5860bbb4e4aea
Author:     Bjoern A. Zeeb <b...@freebsd.org>
AuthorDate: 2025-09-04 20:24:26 +0000
Commit:     Bjoern A. Zeeb <b...@freebsd.org>
CommitDate: 2025-09-05 23:24:15 +0000

    LinuxKPI: timer KPI *_timer -> timer_*
    
    del_timer() got renamed to timer_delete() approximately in Linux 6.2
    (similar for *_sync and likely others).
    Keep the old functions as compat; unclear when we can gc them.
    We should also re-define them with a linuxkpi_ prefix to avoid possible
    conflicts in the future if we do a full pass over this at some point.
    
    Sponsored by:   The FreeBSD Foundation (intiially)
    MFC after:      3 days
    X-MFC;          preserve symbols, not inline
    Reviewed by:    dumbbell
    Differential Revision:  https://reviews.freebsd.org/D52074
---
 sys/compat/linuxkpi/common/include/linux/timer.h | 16 ++++++++++++++--
 sys/compat/linuxkpi/common/src/linux_compat.c    | 11 ++---------
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h 
b/sys/compat/linuxkpi/common/include/linux/timer.h
index bd06e3158fa3..d48939e28a02 100644
--- a/sys/compat/linuxkpi/common/include/linux/timer.h
+++ b/sys/compat/linuxkpi/common/include/linux/timer.h
@@ -84,11 +84,23 @@ extern unsigned long linux_timer_hz_mask;
 extern int mod_timer(struct timer_list *, unsigned long);
 extern void add_timer(struct timer_list *);
 extern void add_timer_on(struct timer_list *, int cpu);
-extern int del_timer(struct timer_list *);
-extern int del_timer_sync(struct timer_list *);
+
+extern int timer_delete(struct timer_list *);
 extern int timer_delete_sync(struct timer_list *);
 extern int timer_shutdown_sync(struct timer_list *);
 
+static inline int
+del_timer(struct timer_list *tl)
+{
+       return (timer_delete(tl));
+}
+
+static inline int
+del_timer_sync(struct timer_list *tl)
+{
+       return (timer_delete_sync(tl));
+}
+
 #define        timer_pending(timer)    callout_pending(&(timer)->callout)
 #define        round_jiffies(j)        \
        ((unsigned long)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask))
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c 
b/sys/compat/linuxkpi/common/src/linux_compat.c
index dcdec0dfcc78..458744a9fec6 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -2120,7 +2120,7 @@ add_timer_on(struct timer_list *timer, int cpu)
 }
 
 int
-del_timer(struct timer_list *timer)
+timer_delete(struct timer_list *timer)
 {
 
        if (callout_stop(&(timer)->callout) == -1)
@@ -2129,7 +2129,7 @@ del_timer(struct timer_list *timer)
 }
 
 int
-del_timer_sync(struct timer_list *timer)
+timer_delete_sync(struct timer_list *timer)
 {
 
        if (callout_drain(&(timer)->callout) == -1)
@@ -2137,13 +2137,6 @@ del_timer_sync(struct timer_list *timer)
        return (1);
 }
 
-int
-timer_delete_sync(struct timer_list *timer)
-{
-
-       return (del_timer_sync(timer));
-}
-
 int
 timer_shutdown_sync(struct timer_list *timer)
 {

Reply via email to