From patchwork Fri Sep 22 10:08:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965767 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 C0ABF6057C for ; Fri, 22 Sep 2017 10:09:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3E652981C for ; Fri, 22 Sep 2017 10:09:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8D992983B; Fri, 22 Sep 2017 10:09: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=-0.3 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_SBL_CSS, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB autolearn=no 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 8216029845 for ; Fri, 22 Sep 2017 10:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbdIVKJO (ORCPT ); Fri, 22 Sep 2017 06:09:14 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32815 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933AbdIVKJN (ORCPT ); Fri, 22 Sep 2017 06:09:13 -0400 Received: by mail-pg0-f68.google.com with SMTP id i130so393072pgc.0; Fri, 22 Sep 2017 03:09: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=dRDiccoZC8TPbgbRKvg/1wXIKRPb1O5JribVuOWQ5fc=; b=HKwL8dox+rdgx1cGn3NOTqhgvKo32zPCxMEh8A/UCbsCGq20M7nvgW4MUHvERAEeRR nXrlYuqLMUD+h4ADBd4cQQ+wBxQ1C9zlw7+x8EAvY00OM0VGKX46JTWOVvlK2pbpKmlv 4aOb+Mk9Z8mld1uq4ZwjqvQsdw9wKbgDCaRtd5+9+b8yTMDbn7jv4m03skK1vGRYtQwf WqL9yiaZrU2l6NthoYgVtf2OlNPHqAJl0t0T1u9JkkYTkAGWqn3miqGp8jOJ1g30NFZ4 1t84y46CICZESonN2P4jTk2uiJ4IiA8ugMPlzQLTy8WZUMGc9B8kWtO8qfs2hhdbKUws xGDQ== 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=dRDiccoZC8TPbgbRKvg/1wXIKRPb1O5JribVuOWQ5fc=; b=GJnQAPmcyY/K6WV+IWom0P+W/+gCENXyu5oUdiAAltbnPcd9uMRZ0Fp5iiLYNU1X16 tGEe1DZ4C+WJ46JKPw6M7TrPCbdGq5t0S5tWUVxq0NfZxXQjqRFnc7jLALrhNzJy+w6k KysCizCFBmGMUZBaF1i7XH25tZdZiNC032ZCfn6KsuoSmvIeXvgqxUCBj+hOJ8IfXvXK wwJOvU0H5hFQLilqMzgOhJOSwy81hsc+CcTYdAEuvaunz+DuIrJY/jcSTU08irdJQ1lW zDhnh/qjWtgavviFXCRN+XQybDMdyR6X8Hx/YvOwAscSJiYi/AXzfwJavfVBLk1y1bqq y6KA== X-Gm-Message-State: AHPjjUjyx1RSx+A0YCxSfkeWVzWtwSdv9nEnw3kvRvwUYxt3JEBLdunu KQcjy7MHWxIvsnpJyiDTYGd735Uz X-Google-Smtp-Source: AOwi7QBw/OyFW5IaJ301Qiu8dtD50AXF9jc3VjWCZmQkR1IdmRdbXplaAg1oCKbien6rq2e73D+WwQ== X-Received: by 10.84.229.13 with SMTP id b13mr8700656plk.189.1506074952551; Fri, 22 Sep 2017 03:09:12 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id b66sm6459537pfe.165.2017.09.22.03.09.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:09:11 -0700 (PDT) From: Allen Pais To: linux-scsi@vger.kernel.org Cc: nab@linux-iscsi.org, target-devel@vger.kernel.org, Allen Pais Subject: [PATCH 4/5] iscsi-target: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:38:53 +0530 Message-Id: <1506074934-15062-5-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506074934-15062-1-git-send-email-allen.lkml@gmail.com> References: <1506074934-15062-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/target/iscsi/iscsi_target_erl1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c index fe9b7f1..858d9c6 100644 --- a/drivers/target/iscsi/iscsi_target_erl1.c +++ b/drivers/target/iscsi/iscsi_target_erl1.c @@ -1264,10 +1264,9 @@ void iscsit_start_dataout_timer( pr_debug("Starting DataOUT timer for ITT: 0x%08x on" " CID: %hu.\n", cmd->init_task_tag, conn->cid); - init_timer(&cmd->dataout_timer); + setup_timer(&cmd->dataout_timer, iscsit_handle_dataout_timeout, + (unsigned long)cmd); cmd->dataout_timer.expires = (get_jiffies_64() + na->dataout_timeout * HZ); - cmd->dataout_timer.data = (unsigned long)cmd; - cmd->dataout_timer.function = iscsit_handle_dataout_timeout; cmd->dataout_timer_flags &= ~ISCSI_TF_STOP; cmd->dataout_timer_flags |= ISCSI_TF_RUNNING; add_timer(&cmd->dataout_timer);