From patchwork Fri Sep 22 09:51:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965705 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 1B30D600C5 for ; Fri, 22 Sep 2017 09:52:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 184892964C for ; Fri, 22 Sep 2017 09:52:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CC092983C; Fri, 22 Sep 2017 09:52:15 +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 A40CF2964C for ; Fri, 22 Sep 2017 09:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752152AbdIVJwO (ORCPT ); Fri, 22 Sep 2017 05:52:14 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37344 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbdIVJwN (ORCPT ); Fri, 22 Sep 2017 05:52:13 -0400 Received: by mail-pg0-f67.google.com with SMTP id v5so361381pgn.4 for ; Fri, 22 Sep 2017 02:52:13 -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=iRDi5LTHh78TO+LM0H0om7S0OQj7l195N95xdd5BVu0=; b=SbX0zzz3RTuMyxwC7DuRTd8VoITnfdip9fzLYkvSNaSuFidcNyW6Dv+4AUJ/5r3GSE hHoO4KMSWnuSQPet5rM1PZLWIQWkAdyLsUdZG9dLOYPuhTjGLYPt5YoZlwiywPJtPTFR L5vUDvGQkhlYyXSu9S2EACatBDInFvwoljtiiWii2jNCt3YOxNyIm/p4p7Y/u5JT1TEG k4Bu8XszR3DSKTbzojcgNvLSlKX6YvY8N7bXM3tqo9GM7nzJlfsfXw22jW0MCRH2Dg8T wzfgjdXaCtm/Mp7SbLxM7qgu9gD4b6bZcOEcTJmNZH4m86paUWyYoAF7PmOsnj/b7+4A ZXbg== 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=iRDi5LTHh78TO+LM0H0om7S0OQj7l195N95xdd5BVu0=; b=ZgWT7ekgM3qWVIyDb6EK9e1sek+FJVjjD2BAPMf5qd7Tvojo3HVLHATfdS7HkgQKhq +u6kUIZ7PD/JpB0dcgpEefx2UHOWnsKa/c1IHjdGXcuTsd6UFJ6H0YsYb1qbPI38t6kI a7jpuT/47K/IwXHecOdgz7IAcezxD+8r1ejmfHQdKmTeVRwy84q8aIgT62S2PiikuBKx Uv9jDuPUGkHCSbuZ/p6o1C020H6YB8UqsVgmjT8cWlohBUmdMOXL6H9TJaDJmbF8TD5p 19xiDCTHSyU9RoEgJWPRzewQH97qKG3WTLYTMhmC/TiZ0aYWVLl3DZBM16X+geFs2qGy uaOQ== X-Gm-Message-State: AHPjjUiVEnDIH0zC4DgDM719gUVLQAE7q5ml/om0aIkK1bpf5mlBpYL4 3T/31SqHAPe2raZIZvtuQW1cLenc X-Google-Smtp-Source: AOwi7QBHmsxxXZpMk+sswT7iq5GH9zhsL0Dim4QxWsqX9URxx8S7bvDb16FZ/vCx6+rmgXMaM620yw== X-Received: by 10.101.72.5 with SMTP id h5mr8992961pgs.305.1506073932470; Fri, 22 Sep 2017 02:52:12 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id k13sm5611977pgo.51.2017.09.22.02.52.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 02:52:11 -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 04/13] scsi: bnx2i: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:21:36 +0530 Message-Id: <1506073905-12985-5-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/bnx2i/bnx2i_iscsi.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index 03c104b..bffc7e9 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -1729,10 +1729,8 @@ static int bnx2i_tear_down_conn(struct bnx2i_hba *hba, } ep->state = EP_STATE_CLEANUP_START; - init_timer(&ep->ofld_timer); + setup_timer(&ep->ofld_timer, bnx2i_ep_ofld_timer, (unsigned long)ep); ep->ofld_timer.expires = hba->conn_ctx_destroy_tmo + jiffies; - ep->ofld_timer.function = bnx2i_ep_ofld_timer; - ep->ofld_timer.data = (unsigned long) ep; add_timer(&ep->ofld_timer); bnx2i_ep_destroy_list_add(hba, ep); @@ -1835,10 +1833,9 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost, bnx2i_ep->state = EP_STATE_OFLD_START; bnx2i_ep_ofld_list_add(hba, bnx2i_ep); - init_timer(&bnx2i_ep->ofld_timer); + setup_timer(&bnx2i_ep->ofld_timer, bnx2i_ep_ofld_timer, + (unsigned long)bnx2i_ep); bnx2i_ep->ofld_timer.expires = 2 * HZ + jiffies; - bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer; - bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep; add_timer(&bnx2i_ep->ofld_timer); if (bnx2i_send_conn_ofld_req(hba, bnx2i_ep)) { @@ -2054,10 +2051,9 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep) session = conn->session; } - init_timer(&bnx2i_ep->ofld_timer); + setup_timer(&bnx2i_ep->ofld_timer, bnx2i_ep_ofld_timer, + (unsigned long)bnx2i_ep); bnx2i_ep->ofld_timer.expires = hba->conn_teardown_tmo + jiffies; - bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer; - bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep; add_timer(&bnx2i_ep->ofld_timer); if (!test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic))