From patchwork Fri Sep 22 10:08:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965759 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 B95846020C for ; Fri, 22 Sep 2017 10:09:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC4922983B for ; Fri, 22 Sep 2017 10:09:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFA1C2981C; Fri, 22 Sep 2017 10:09:11 +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 698DD2981C for ; Fri, 22 Sep 2017 10:09:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbdIVKJJ (ORCPT ); Fri, 22 Sep 2017 06:09:09 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35934 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbdIVKJH (ORCPT ); Fri, 22 Sep 2017 06:09:07 -0400 Received: by mail-pg0-f66.google.com with SMTP id d8so384140pgt.3; Fri, 22 Sep 2017 03:09:07 -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=VxfznaPOb40lK0f7QNvQgQReJGaDrlSK5h7HLHdqxL8=; b=SZ2efHrbP9oqtgvZ+dpwo4Mh/ssiJB6jinoOrVvMp2l5AOp164eTAOeuYbpxnYwPxD GFpKbHlFh192qGRg0i3fWR3CvXqmmv4wqvrmFe9AH4kFK5sQRT4ZmzA+f3iLXQb11dFg 2QWtITft8KNgNl2Hf1tLvjpmlcgSi9a4MK8lR7p+PgvjgZY8xDYDxcLiFB6R5REjWNQ/ jLHrq7rRc+qTenTkWnVnKvauhTkvOaHf3aga+WrHk6UTHEFhIGf6yaPvyJ+9IpQHxlQv SFUX9tL6jh3ZthKuY76OTDLSpj6YsiS+V2raPn7b1FvEFLBjPAGfpBfkN4zIl4rK4q6r +Bnw== 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=VxfznaPOb40lK0f7QNvQgQReJGaDrlSK5h7HLHdqxL8=; b=cDS3RbgVAWhFV2qzTTYvEMDFOPtOLvN2Wmm5GFHCvqILacmSsPB/Qd+tHSBFEHz89G VxRUez+JtVPTOv1gXz5q9GMaysiy5jZAavYwWxjE3jdwYWRMCtyV3vY17KpVE1fNsUj6 sGMDfDTUUjuWlE4qcOs6xH09EkXASjpGbfWtyXzh8Mo4X8rTujYD0wbBFtLw4xtUsyKV XvRa7gb04IW0lA8U42YAcoTBjnms3++yFfMglmwh+CeTIieuX0iSLuUTgOpFsgiceSK+ V5RYi0aMY6uBPX7GOdOT1mGpxqdBrEnB0zRmMfbQd0SPHzVtdukrJVTiJEMrVKCX0wr9 E7Gw== X-Gm-Message-State: AHPjjUjflxsQe2r3b8dYdByZbw/kpWxsPcOPS7ecnUJ+wP2heclOOcZG HrgFDS0orIglLnMaNlz6e7rCEsqX X-Google-Smtp-Source: AOwi7QDCBcs/vXK4i9QD3v4IK+QjOPwXL/y2rco31W3yc7XPfEjqthgt87uDRqSYmoZqClWkHfBKGA== X-Received: by 10.101.82.69 with SMTP id q5mr4438090pgp.140.1506074946700; Fri, 22 Sep 2017 03:09:06 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id b66sm6459537pfe.165.2017.09.22.03.09.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:09:05 -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 2/5] iscsi-target: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:38:51 +0530 Message-Id: <1506074934-15062-3-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_login.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index dc13afb..e608fd5 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -866,10 +866,9 @@ static void iscsi_start_login_thread_timer(struct iscsi_np *np) * point we do not have access to ISCSI_TPG_ATTRIB(tpg)->login_timeout */ spin_lock_bh(&np->np_thread_lock); - init_timer(&np->np_login_timer); + setup_timer(&np->np_login_timer, iscsi_handle_login_thread_timeout, + (unsigned long)np); np->np_login_timer.expires = (get_jiffies_64() + TA_LOGIN_TIMEOUT * HZ); - np->np_login_timer.data = (unsigned long)np; - np->np_login_timer.function = iscsi_handle_login_thread_timeout; np->np_login_timer_flags &= ~ISCSI_TF_STOP; np->np_login_timer_flags |= ISCSI_TF_RUNNING; add_timer(&np->np_login_timer);