lkml.org 
[lkml]   [2017]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] aoe: use setup_timer
From
Date
On 03/24/2017 10:15 AM, Geliang Tang wrote:
> Use setup_timer() instead of init_timer() to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> drivers/block/aoe/aoemain.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/block/aoe/aoemain.c b/drivers/block/aoe/aoemain.c
> index 4b987c2..20865d4 100644
> --- a/drivers/block/aoe/aoemain.c
> +++ b/drivers/block/aoe/aoemain.c
> @@ -28,10 +28,8 @@ discover_timer(ulong vp)
>
> switch (vp) {
> case TINIT:
> - init_timer(&t);
> + setup_timer(&t, discover_timer, TRUN);
> spin_lock_init(&lock);
> - t.data = TRUN;
> - t.function = discover_timer;
> die = 0;
> case TRUN:
> spin_lock_irqsave(&lock, flags);
>

This change looks OK to me, thanks.

--
Ed

\
 
 \ /
  Last update: 2017-03-25 20:32    [W:0.060 / U:1.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site