* [PATCH] RAS/CEC: Convert timers to use timer_setup()
@ 2017-10-24 10:26 Kees Cook
2017-11-01 13:19 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2017-10-24 10:26 UTC (permalink / raw)
To: Borislav Petkov
Cc: Thomas Gleixner, Christophe JAILLET, Nicolas Iooss, Ingo Molnar,
linux-kernel
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 <bp@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/ras/cec.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index e2c1988cd7c0..fb2789575603 100644
--- a/drivers/ras/cec.c
+++ b/drivers/ras/cec.c
@@ -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");
--
2.7.4
--
Kees Cook
Pixel Security
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] RAS/CEC: Convert timers to use timer_setup()
2017-10-24 10:26 [PATCH] RAS/CEC: Convert timers to use timer_setup() Kees Cook
@ 2017-11-01 13:19 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2017-11-01 13:19 UTC (permalink / raw)
To: Kees Cook
Cc: Thomas Gleixner, Christophe JAILLET, Nicolas Iooss, Ingo Molnar,
linux-kernel
On Tue, Oct 24, 2017 at 03:26:36AM -0700, Kees Cook wrote:
> 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 <bp@suse.de>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> drivers/ras/cec.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
Reviewed-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-01 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 10:26 [PATCH] RAS/CEC: Convert timers to use timer_setup() Kees Cook
2017-11-01 13:19 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).