[PATCH 04/17] treewide, timers: Rename add_timer_local() => timer_add_local()

Ingo Molnar
2025-04-14T10:23:18Z

Move this API to the canonical timer_*() namespace.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/timer.h | 2 +-
kernel/time/timer.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/timer.h b/include/linux/timer.h
index d35d3f27a987..5944cfb196c5 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -159,7 +159,7 @@ extern int timer_reduce(struct timer_list *timer, unsigned long expires);
#define NEXT_TIMER_MAX_DELTA ((1UL << 30) - 1)

extern void add_timer(struct timer_list *timer);
-extern void add_timer_local(struct timer_list *timer);
+extern void timer_add_local(struct timer_list *timer);
extern void timer_add_global(struct timer_list *timer);

extern int try_to_del_timer_sync(struct timer_list *timer);
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 47165b16380a..3fd0b13c0b74 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1293,21 +1293,21 @@ void add_timer(struct timer_list *timer)
EXPORT_SYMBOL(add_timer);

/**
- * add_timer_local() - Start a timer on the local CPU
+ * timer_add_local() - Start a timer on the local CPU
* @timer: The timer to be started
*
* Same as add_timer() except that the timer flag TIMER_PINNED is set.
*
* See add_timer() for further details.
*/
-void add_timer_local(struct timer_list *timer)
+void timer_add_local(struct timer_list *timer)
{
if (WARN_ON_ONCE(timer_pending(timer)))
return;
timer->flags |= TIMER_PINNED;
__mod_timer(timer, timer->expires, MOD_TIMER_NOTPENDING);
}
-EXPORT_SYMBOL(add_timer_local);
+EXPORT_SYMBOL(timer_add_local);

/**
* timer_add_global() - Start a timer without TIMER_PINNED flag set
--
2.45.2