From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbdIVLRg (ORCPT ); Fri, 22 Sep 2017 07:17:36 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33497 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928AbdIVLQz (ORCPT ); Fri, 22 Sep 2017 07:16:55 -0400 X-Google-Smtp-Source: AOwi7QD3CVFjUnqEA2JlaujadSxr+62SnHjugb+YVTSOlxh0g1bXguO3IJOuJGabnQvuyNDa63gkug== From: Allen Pais To: linux-kernel@vger.kernel.org Cc: ed.cashin@acm.org, Allen Pais Subject: [PATCH 3/5] block: aoe: use setup_timer() helper. Date: Fri, 22 Sep 2017 16:46:37 +0530 Message-Id: <1506078999-4723-4-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506078999-4723-1-git-send-email-allen.lkml@gmail.com> References: <1506078999-4723-1-git-send-email-allen.lkml@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/block/aoe/aoedev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index b28fefb..1461cfc 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -466,9 +466,7 @@ aoedev_by_aoeaddr(ulong maj, int min, int do_alloc) INIT_WORK(&d->work, aoecmd_sleepwork); spin_lock_init(&d->lock); skb_queue_head_init(&d->skbpool); - init_timer(&d->timer); - d->timer.data = (ulong) d; - d->timer.function = dummy_timer; + setup_timer(&d->timer, dummy_timer, (ulong)d); d->timer.expires = jiffies + HZ; add_timer(&d->timer); d->bufpool = NULL; /* defer to aoeblk_gdalloc */ -- 2.7.4