mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
timer: Convert stub timer to timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
32a6c7233c
commit
ba16490eac
@ -610,7 +610,7 @@ static bool timer_fixup_init(void *addr, enum debug_obj_state state)
|
||||
}
|
||||
|
||||
/* Stub timer callback for improperly used timers. */
|
||||
static void stub_timer(unsigned long data)
|
||||
static void stub_timer(struct timer_list *unused)
|
||||
{
|
||||
WARN_ON(1);
|
||||
}
|
||||
@ -626,7 +626,7 @@ static bool timer_fixup_activate(void *addr, enum debug_obj_state state)
|
||||
|
||||
switch (state) {
|
||||
case ODEBUG_STATE_NOTAVAILABLE:
|
||||
setup_timer(timer, stub_timer, 0);
|
||||
timer_setup(timer, stub_timer, 0);
|
||||
return true;
|
||||
|
||||
case ODEBUG_STATE_ACTIVE:
|
||||
@ -665,7 +665,7 @@ static bool timer_fixup_assert_init(void *addr, enum debug_obj_state state)
|
||||
|
||||
switch (state) {
|
||||
case ODEBUG_STATE_NOTAVAILABLE:
|
||||
setup_timer(timer, stub_timer, 0);
|
||||
timer_setup(timer, stub_timer, 0);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user