From patchwork Fri Sep 22 10:08:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965753 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 2CBB96020C for ; Fri, 22 Sep 2017 10:09:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F78E2983B for ; Fri, 22 Sep 2017 10:09:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2488329845; Fri, 22 Sep 2017 10:09:07 +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 B7F6B2983B for ; Fri, 22 Sep 2017 10:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbdIVKJF (ORCPT ); Fri, 22 Sep 2017 06:09:05 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36493 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbdIVKJE (ORCPT ); Fri, 22 Sep 2017 06:09:04 -0400 Received: by mail-pf0-f196.google.com with SMTP id f84so279148pfj.3; Fri, 22 Sep 2017 03:09:04 -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=wCXwoAPcQfFA8CcDWBFe+cNqzMGmLFDdXl8D+PQs7ro=; b=iPNuVqWkSgNDmJYVRjRMlXzFilsqKoAxsesvGwMzy2ICdWYxZ0pBXJSrHPMIsvzZWu rxCuuNaPWNxpYqFeMXAGqSCgbT3wQXoz9vHDEXHgKOkItVLl7+9JOf18JP7+afOsKZRc yPIZYSt5c8Gg+y0xqQ6GnDTOO4/ppm9Pqgm/yDV5+VUIPjp0uYqyIqKmB4bu59rdGxwr RtHV0SSRlWyFSYXJ6zK0RKppOVp9FqGmJkBe3BxtLo3ZHLYdRpTCMgq6nS2AF877la6L 6AnIi8vdqVJ1dRUkRt12bV22BpL4PGk1vniyzyWq7tGJnOs4gAFMelbWrLe+LDS3qpSD gSyA== 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=wCXwoAPcQfFA8CcDWBFe+cNqzMGmLFDdXl8D+PQs7ro=; b=ltVSwQWoTjuaxZUMymyNM7lPU/+R4R8Wcik0Di+qXVN3AqmzomxwIGFl8HUcILO4Z9 AgsuKI+cGnDmY14LEUHiYoqaLQdp21TvwsEb7x1g7G+kNRB25LTaj4vg485ssgi0Ffw3 mtnriHVDDpgcXZWXms/yaB3kUl4pDxMba1eZVWyA4eqX545dvCbIwEQ9Yp/J5XRXkeS1 gHlUsFid7ORUiF16PiS5c/uPvdE3t4e1NTY1pDGeB22ujfjCVKIYuCPhSeb8IA/Ly5zu VN1ybWc0unbKjFBfgtnwPbUhI3hw6MtI0XvTFBMJWB2yi31EiwHRvZYFxHJFFXRvNBao XLGA== X-Gm-Message-State: AHPjjUiRNsRBUkVRq0uCljdRYUqQOhcCtIxLnoLfCZnrPko2TIqx9Ahn V+8eq5sDcm5OOs6ELyKIKnLQfudZ X-Google-Smtp-Source: AOwi7QDa7keQGN5kCYIJeEsj6LYKsi+zKXQIbPxFytwchL3oWOa70BsA7hRIOVu8P33nNFDEtBZdSg== X-Received: by 10.159.244.18 with SMTP id x18mr8463541plr.117.1506074943886; Fri, 22 Sep 2017 03:09:03 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id b66sm6459537pfe.165.2017.09.22.03.09.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:09:02 -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 1/5] iscsi-target: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:38:50 +0530 Message-Id: <1506074934-15062-2-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_nego.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 7a6751f..5b22f01 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -618,10 +618,9 @@ static void iscsi_target_do_login_rx(struct work_struct *work) conn->login_kworker = current; allow_signal(SIGINT); - init_timer(&login_timer); + setup_timer(&login_timer, iscsi_target_login_timeout, + (unsigned long)conn); login_timer.expires = (get_jiffies_64() + TA_LOGIN_TIMEOUT * HZ); - login_timer.data = (unsigned long)conn; - login_timer.function = iscsi_target_login_timeout; add_timer(&login_timer); pr_debug("Starting login_timer for %s/%d\n", current->comm, current->pid);