git: 2e07e885d659 - main - LinuxKPI: implement timer_{delete,shutdown}_sync()

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 09 Jun 2023 22:26:28 UTC
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e07e885d65973f13d6111f7e0fcfb848a68082e

commit 2e07e885d65973f13d6111f7e0fcfb848a68082e
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-05-16 21:02:03 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-06-09 22:25:33 +0000

    LinuxKPI: implement timer_{delete,shutdown}_sync()
    
    Implement timer_{delete,shutdown}_sync(), which do not seem to require
    anything additional to the already existing del_timer_sync().
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      10 days
    Reviewed by:    hselasky
    Differential Revision: https://reviews.freebsd.org/D40124
---
 sys/compat/linuxkpi/common/include/linux/timer.h |  2 ++
 sys/compat/linuxkpi/common/src/linux_compat.c    | 14 ++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h
index 3432bfc46c4f..7b2f589a3047 100644
--- a/sys/compat/linuxkpi/common/include/linux/timer.h
+++ b/sys/compat/linuxkpi/common/include/linux/timer.h
@@ -83,6 +83,8 @@ 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_sync(struct timer_list *);
+extern int timer_shutdown_sync(struct timer_list *);
 
 #define	timer_pending(timer)	callout_pending(&(timer)->callout)
 #define	round_jiffies(j)	\
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index d639cda64dc9..ffa7193620bc 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -2147,6 +2147,20 @@ 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)
+{
+
+	return (del_timer_sync(timer));
+}
+
 /* greatest common divisor, Euclid equation */
 static uint64_t
 lkpi_gcd_64(uint64_t a, uint64_t b)