From patchwork Fri Sep 22 10:08:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965761 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 3CCED6020C for ; Fri, 22 Sep 2017 10:09:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 404A12981C for ; Fri, 22 Sep 2017 10:09:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3543929841; Fri, 22 Sep 2017 10:09:13 +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 F064B2981C for ; Fri, 22 Sep 2017 10:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbdIVKJM (ORCPT ); Fri, 22 Sep 2017 06:09:12 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35210 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbdIVKJK (ORCPT ); Fri, 22 Sep 2017 06:09:10 -0400 Received: by mail-pf0-f196.google.com with SMTP id i23so282523pfi.2; Fri, 22 Sep 2017 03:09:10 -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=ifummEVC/HLgQtQ45ESAA1+Q2weN5LljVO5xAx/XB3s=; b=WNInTsDIkjkey2JwICshjg3b832RSEEwi6vX2SEvdQJ4vw/WccUJ3EF8eXN3w5dL/B ZOh9SlwzNAJNUKPfLsT3Lo6E7LlcaQyaZzHlW2U1Fns8tYPi5sZPnKA6i0sjCoFY8zwv H4izMAlXUmis/0UURjPHT3VHa69Uk+3MPGiG7yHFM0jFxhSgUCxfUseJNPFETuQV+L1b jwEJr1u2AT9p26MxxaBnPK+bEQW8748N4QyAQw/+mYeex0qLn697OpSoYipWAAMJV2y/ V7fnv1TlOfcps/avMfn30nyhXPCv4Ql6uYMuxXO3gvCPp8RQfPrkQU5cBLWYYsaYn4O7 /iPw== 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=ifummEVC/HLgQtQ45ESAA1+Q2weN5LljVO5xAx/XB3s=; b=gO27AOU6X9Me3Obsn5lM8312Ug7YuZDm1HCVxLXy4blfgXJetl4FiX50JpeXryybiI IgecMLgtLEjR5oxSVJDJ5ceBGyblZcIky+jCxlP2Z6DwjDuHvki2TVtkSgQdouyj5Dqf aSl3nS/aEi6K+eFUzVuc+xpSGcpK/e1DBwW20DdTOHMkEx64X4wizPbBmFIgJPGtGmNY twmfv02jvdtdSAM30AWnL4i1HXzpunKPEL+8XZlM/lKBOBqkNoNITfxhqcDxljQdjqBs FgAxaQVLb6bWZ5YV2CieJWvRHYDtBVLjGcfnpOwBDF7RUeE+P02Ohsk13GNem6kvfUTe Zd1g== X-Gm-Message-State: AHPjjUhjicPBgcvAtVjA/ntX3AQkvwZSloku1Z8spBNY4TuFgo0SbAnW X6wjH0V4HKZCu9n7dSHp6xPC4THM X-Google-Smtp-Source: AOwi7QDj2CPRW61NJbifYoBs22/q5USEKUrCcevD8zkcvGheqtlJVc+VxU27yHku71Jmk7m4rKka/g== X-Received: by 10.101.88.131 with SMTP id d3mr8930347pgu.209.1506074949533; Fri, 22 Sep 2017 03:09:09 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id b66sm6459537pfe.165.2017.09.22.03.09.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:09:08 -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 3/5] iscsi-target: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:38:52 +0530 Message-Id: <1506074934-15062-4-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_erl0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c index 7fe2aa7..3131d7b 100644 --- a/drivers/target/iscsi/iscsi_target_erl0.c +++ b/drivers/target/iscsi/iscsi_target_erl0.c @@ -809,11 +809,10 @@ void iscsit_start_time2retain_handler(struct iscsi_session *sess) pr_debug("Starting Time2Retain timer for %u seconds on" " SID: %u\n", sess->sess_ops->DefaultTime2Retain, sess->sid); - init_timer(&sess->time2retain_timer); + setup_timer(&sess->time2retain_timer, + iscsit_handle_time2retain_timeout, (unsigned long)sess); sess->time2retain_timer.expires = (get_jiffies_64() + sess->sess_ops->DefaultTime2Retain * HZ); - sess->time2retain_timer.data = (unsigned long)sess; - sess->time2retain_timer.function = iscsit_handle_time2retain_timeout; sess->time2retain_timer_flags &= ~ISCSI_TF_STOP; sess->time2retain_timer_flags |= ISCSI_TF_RUNNING; add_timer(&sess->time2retain_timer);