[PATCH 15/17] treewide, timers: Rename __init_timer_on_stack() => __timer_init_on_stack()

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

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

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

diff --git a/include/linux/timer.h b/include/linux/timer.h
index 149dfb1f75fa..0f0531e827c4 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -94,7 +94,7 @@ static inline void timer_init_on_stack_key(struct timer_list *timer,
timer_init_key((_timer), (_fn), (_flags), #_timer, &__key);\
} while (0)

-#define __init_timer_on_stack(_timer, _fn, _flags) \
+#define __timer_init_on_stack(_timer, _fn, _flags) \
do { \
static struct lock_class_key __key; \
timer_init_on_stack_key((_timer), (_fn), (_flags), \
@@ -103,7 +103,7 @@ static inline void timer_init_on_stack_key(struct timer_list *timer,
#else
#define __timer_init(_timer, _fn, _flags) \
timer_init_key((_timer), (_fn), (_flags), NULL, NULL)
-#define __init_timer_on_stack(_timer, _fn, _flags) \
+#define __timer_init_on_stack(_timer, _fn, _flags) \
timer_init_on_stack_key((_timer), (_fn), (_flags), NULL, NULL)
#endif

@@ -121,7 +121,7 @@ static inline void timer_init_on_stack_key(struct timer_list *timer,
__timer_init((timer), (callback), (flags))

#define timer_setup_on_stack(timer, callback, flags) \
- __init_timer_on_stack((timer), (callback), (flags))
+ __timer_init_on_stack((timer), (callback), (flags))

#ifdef CONFIG_DEBUG_OBJECTS_TIMERS
extern void timer_destroy_on_stack(struct timer_list *timer);
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 985f69f8fb99..c84da78878d9 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -324,7 +324,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
#define __INIT_DELAYED_WORK_ONSTACK(_work, _func, _tflags) \
do { \
INIT_WORK_ONSTACK(&(_work)->work, (_func)); \
- __init_timer_on_stack(&(_work)->timer, \
+ __timer_init_on_stack(&(_work)->timer, \
delayed_work_timer_fn, \
(_tflags) | TIMER_IRQSAFE); \
} while (0)
--
2.45.2