From patchwork Fri Sep 22 10:08:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965769 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 742E56057C for ; Fri, 22 Sep 2017 10:09:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 773992981C for ; Fri, 22 Sep 2017 10:09:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C43129841; Fri, 22 Sep 2017 10:09:18 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB,T_DKIM_INVALID 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 1E1412983B for ; Fri, 22 Sep 2017 10:09:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbdIVKJR (ORCPT ); Fri, 22 Sep 2017 06:09:17 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35227 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbdIVKJQ (ORCPT ); Fri, 22 Sep 2017 06:09:16 -0400 Received: by mail-pf0-f194.google.com with SMTP id i23so282604pfi.2; Fri, 22 Sep 2017 03:09:15 -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=N+D+tncGDCZldNwz7MdBGv21ZzkK3uNn0Vf8bgWkMg0=; b=GvwYDJrjcdGN+n0FJdxTYfsCNPh+uWi56BuL9N+ZuEicQcmDZkfSs3FaarF+XxvxRI lHP3BP0on6Xr3zLJGokmho/AXhPfjVfJac2/4NsuTU22Ob5CHUwuHnRunDrP/regW5cW U99ZyIxj0wZHL2T9sF7GT876aqkPQlD/XQA3CBgNO/OZkc6hgNfsep1pvKl9ntOL/X9q 0wVnZnIHf4oBe04PsZysrC0aUd2+Q2bMmQ0c3/XMcoa9oDkm3DHVOaij3gFbQD7ZlHnG ho4PXtXzbnxbPET/rcsiSO9B2fuIZFfz/xUGLRQDWV2t/VkMW0kuesgEeZv8kgbfevl2 Su4w== 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=N+D+tncGDCZldNwz7MdBGv21ZzkK3uNn0Vf8bgWkMg0=; b=l+zaEs40p5wT7jEgul8GdJuh1fpNR6c8B9WKAMpbsoVol0358yyxzoi9HdCycKpWP9 igf7S9zkNad5PnZNXq6U6s1rJ5PM4TDpE2KsEN/YerfJLV7IEGfLImPMrpH5AhHSH/b+ hwlShpPcOpaiyLCnLB14pN3v7HmqIitzXje1lphkeC3mGcy9l2IEbHZZz38b9NLKaAMq dxIUH3l7b3SIoRv/fAYu8yqOoSqe3zwpe/Z2ia5QQrUcDnOtX7gV7OYFjXAlg3XbGHem eel4PQqTyW4dEVVXlzTa0j3g/C+xL+tt8MpY4f8ZxOhpKhNpC00Vi99HiGKUvezSuk4X qklg== X-Gm-Message-State: AHPjjUgxZ1sV37cQJ5A5VzeqcjTTGVRU/pN5SOdxddauoiNWDtAbD4vZ atTTgllbruyHLMwErKggV96TOl36 X-Google-Smtp-Source: AOwi7QAItTmFc7VB6vSIBF+Q5MRZAMl2EugmjN7crPeukvu1UfF+vfZjceJL8lbmhH4z19XHuXikNQ== X-Received: by 10.99.154.18 with SMTP id o18mr7695323pge.18.1506074955318; Fri, 22 Sep 2017 03:09:15 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id b66sm6459537pfe.165.2017.09.22.03.09.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:09:14 -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 5/5] iscsi-target: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:38:54 +0530 Message-Id: <1506074934-15062-6-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: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@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_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 1e36f83..97697a9 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -949,11 +949,10 @@ void iscsit_start_nopin_response_timer(struct iscsi_conn *conn) return; } - init_timer(&conn->nopin_response_timer); + setup_timer(&conn->nopin_response_timer, + iscsit_handle_nopin_response_timeout, (unsigned long)conn); conn->nopin_response_timer.expires = (get_jiffies_64() + na->nopin_response_timeout * HZ); - conn->nopin_response_timer.data = (unsigned long)conn; - conn->nopin_response_timer.function = iscsit_handle_nopin_response_timeout; conn->nopin_response_timer_flags &= ~ISCSI_TF_STOP; conn->nopin_response_timer_flags |= ISCSI_TF_RUNNING; add_timer(&conn->nopin_response_timer);