Re: [PATCH] aoe: use setup_timer

From: Ed Cashin
Date: Sat Mar 25 2017 - 15:33:01 EST


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@xxxxxxxxx>
---
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