From patchwork Fri Sep 22 09:51:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 35D3B600C5 for ; Fri, 22 Sep 2017 09:52:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3550C2982C for ; Fri, 22 Sep 2017 09:52:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A35B29845; Fri, 22 Sep 2017 09:52:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE93B2982C for ; Fri, 22 Sep 2017 09:52:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752157AbdIVJwx (ORCPT ); Fri, 22 Sep 2017 05:52:53 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35242 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295AbdIVJwv (ORCPT ); Fri, 22 Sep 2017 05:52:51 -0400 Received: by mail-pg0-f65.google.com with SMTP id j16so367099pga.2 for ; Fri, 22 Sep 2017 02:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pccnvM/rB3Doypy/o+PkoXsf4EQ6ys2J1p3on6cD0TE=; b=ZDUDu0YpLGriUozem4WS59sPYLXJ8cr2yXxuCQN38usuoTKyyPKJYATMtAmWgHxfrc XV+PBGLka6WhegD1qqe1kZaFFOmjkx+ZLMvw57M1eX8MbQ8GY2UQ7IPgjKcBkH4jzDbV dyME0T/96lxb6i89AFg/hrPA7gPToBJ19Gxsfz1JJ2I/1ng8GphO78MdyNkW1UldTN6i pyRYgcLNaolMRblS+mcb9gEFaOh8eeUq+xN2ENuKwvUi2fy7Ej9gzillFhgvnvAVGkqZ 4W/0hgcYjVuxIfD5SYTggqg2huZaKDvhyDAp9aiQWZCJboJBcURVbCGIG6kKSNK2Gg59 S4aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pccnvM/rB3Doypy/o+PkoXsf4EQ6ys2J1p3on6cD0TE=; b=l78z5rnJPixDxk2k0krQUO99xLg4l4PP9xJaNQ+uc5HjQABYqVzBzsoFegQJqARbv2 uFoQyHb3tHlxfEafkYu1iIA+MAzjxNdq5r6/U3CZdR9X/Nz4PBLrVswR+qicMLkpUzCC 6yKHZx8RMxLfYJrn99tzvNwJvOc2sdYIWuLeHz3b5CnzbjWxxvWqHixm8abyYrC2JHIU O705l6a2df7h1I9MjFDZ51YeU0iHXX1mD/FRXaGfy69jRhI56wlUcZlKISBxPh2+Ws6H v4VTPf4qMrK6qzoE3sGQphp9O5zmSEOCTKXU2C5eMepzregw6tTvzx1Q7ELLCQbGkKvW 5cCQ== X-Gm-Message-State: AHPjjUiGSbQJ1nLNJiSotg6b56NXtuaxNTH0HQaA+8l1NOSBVIu/DQ2S fnyyt4tmHEhU2Nrm7zbXA/0FzLEd X-Google-Smtp-Source: AOwi7QCjH0o7Nua/bBHYQ1H+g5jfx9do89KouvM7NYmlAvERBwX0CRbmN7aPUaeEgdHWIadY3OlPkQ== X-Received: by 10.84.234.137 with SMTP id n9mr7600582plk.383.1506073970516; Fri, 22 Sep 2017 02:52:50 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id k13sm5611977pgo.51.2017.09.22.02.52.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 02:52:49 -0700 (PDT) From: Allen Pais To: linux-scsi@vger.kernel.org Cc: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux@armlinux.org.uk, oliver@neukum.org, aliakc@web.de, lenehan@twibble.org, lduncan@suse.com, cleech@redhat.com, matthew@wil.cx, Allen Pais Subject: [PATCH 12/13] scsi: qla2xxx: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:21:44 +0530 Message-Id: <1506073905-12985-13-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506073905-12985-1-git-send-email-allen.lkml@gmail.com> References: <1506073905-12985-1-git-send-email-allen.lkml@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/qla2xxx/qla_os.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5b2437a..8058eeb 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -332,10 +332,9 @@ struct scsi_transport_template *qla2xxx_transport_vport_template = NULL; __inline__ void qla2x00_start_timer(scsi_qla_host_t *vha, void *func, unsigned long interval) { - init_timer(&vha->timer); + setup_timer(&vha->timer, (void(*)(unsigned long))func, + (unsigned long)vha); vha->timer.expires = jiffies + interval * HZ; - vha->timer.data = (unsigned long)vha; - vha->timer.function = (void (*)(unsigned long))func; add_timer(&vha->timer); vha->timer_active = 1; }