RAS/CEC: Convert timers to use timer_setup()
PATCH 1/1 RAS/CEC: Convert timers to use 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.
Cc Borislav Petkov <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Christophe JAILLET <[email protected]>
Cc Nicolas Iooss <[email protected]>
Cc Ingo Molnar <[email protected]>
Signed-off-by Kees Cook <[email protected]>
--- drivers/ras/cec.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/ras/cec.c +3 -5
@@ -168,11 +168,9 @@ static void cec_mod_timer(struct timer_list *t, unsigned long interval)mod_timer (t,round_jiffies (iv)); } -static void cec_timer_fn (unsigned long data) +static void cec_timer_fn (struct timer_list *unused) { -struct ce_array *ca = (struct ce_array *)data; - -do_spring_cleaning (ca); +do_spring_cleaning (&ce_arr);cec_mod_timer (&cec_timer, timer_interval); }
@@ -509,7 +507,7 @@ void __init cec_init(void)if (create_debugfs_nodes ())return ; -setup_timer (&cec_timer, cec_timer_fn, (unsigned long )&ce_arr); +timer_setup (&cec_timer, cec_timer_fn,0 );cec_mod_timer (&cec_timer,CEC_TIMER_DEFAULT_INTERVAL );pr_info ("Correctable Errors collector initialized.\n" );
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security
Quoted 10 lines · Kees Cook
In preparation for unconditionally passing the struct
timer_listpointer to all timer callbacks, switch to using the newtimer_setup()andfrom_timer()to pass the timer pointer explicitly.Cc Borislav Petkov <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Christophe JAILLET <[email protected]>Cc Nicolas Iooss <[email protected]>Cc Ingo Molnar <[email protected]>Signed-off-by Kees Cook <[email protected]>
Quoted 3 lines
--- drivers/ras/cec.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
Reviewed-by Borislav Petkov <[email protected]>
Signature · 5 lines
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--