Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976AbdITXhw (ORCPT ); Wed, 20 Sep 2017 19:37:52 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:52846 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbdITXht (ORCPT ); Wed, 20 Sep 2017 19:37:49 -0400 X-Google-Smtp-Source: AOwi7QAGgBOswvJw0XN7L6wlljgAQwfISFvmnsCVJwRTv81dpIN7u3QJXDtD86FQ4H+8SSmGcwC3TQ== From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , QLogic-Storage-Upstream@qlogic.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 29/31] scsi/bnx2i: Initialize timer Date: Wed, 20 Sep 2017 16:27:53 -0700 Message-Id: <1505950075-50223-30-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505950075-50223-1-git-send-email-keescook@chromium.org> References: <1505950075-50223-1-git-send-email-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1307 Lines: 30 There was a seemingly missing call to setup_timer() in one handler, so add setup_timer() here to remove the open-coded initialization. Cc: QLogic-Storage-Upstream@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook --- drivers/scsi/bnx2i/bnx2i_iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index bffc7e91b7e5..337139dadad0 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -1611,9 +1611,9 @@ static int bnx2i_conn_start(struct iscsi_cls_conn *cls_conn) * this should normally not sleep for a long time so it should * not disrupt the caller. */ + setup_timer(&bnx2i_conn->ep->ofld_timer, bnx2i_ep_ofld_timer, + (unsigned long) bnx2i_conn->ep); bnx2i_conn->ep->ofld_timer.expires = 1 * HZ + jiffies; - bnx2i_conn->ep->ofld_timer.function = bnx2i_ep_ofld_timer; - bnx2i_conn->ep->ofld_timer.data = (unsigned long) bnx2i_conn->ep; add_timer(&bnx2i_conn->ep->ofld_timer); /* update iSCSI context for this conn, wait for CNIC to complete */ wait_event_interruptible(bnx2i_conn->ep->ofld_wait, -- 2.7.4