Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp163411pxj; Wed, 16 Jun 2021 23:19:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEGk7GiujCbJPzRxtH2l11OR9gMEaeSduIdXYkzg2t4Ee/3J52NQrIAUKlgjx0XNSVvbWa X-Received: by 2002:a92:d589:: with SMTP id a9mr2261696iln.175.1623910793478; Wed, 16 Jun 2021 23:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623910793; cv=none; d=google.com; s=arc-20160816; b=u1Sd36qLhMUJgkByBJ1wPh/bx0F4C2x46WBqO+8AP8ujSo/kh2Yq+1HXv8JHl6+FKO IjZYw37vqylBCqJ5CMs1163NxsGU23qD2tPonomA7rzLA60dm6s/ZlG1QVt094Yp/nb2 q4oVgyy2/Nw4bWa+wlsoSUF6NKu+71LjXIcPg8qHuv4hL/C5h2dOZ+fspiORUUw38Qlu iKHlr/1QeNBFgZywVfE03TnkvcrwKizTLaMGUIBtMK+0R/UK6X3y/7TPtSOsusfvhC0P ltwU/kHOXjySwZ43N1/AaNb5p4Uiz0tJo5cuROldxWp8aShXlWtXALD/35VWyCUU7MeM JmLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GuG8Z8csVVnC8gUemRlGImTJZKQOHU00q3bguqh691c=; b=JgSZdKxzXP4Aq/Vo1pEqtb2y5toP985UI1/zFHK/2/wh5GE/Ge/KDMXBaJ63aZvWno YORx0k9AszCaaIxpIeFjHlgGPSF9CTkcSI9ssG6M9Jw6QrubAUKCRKfaGGbX0qGGLxKu DioQ5RLjUia4vG4Djd+6bJgXwRfiI1do9Ulg2Kr7OSwDBD2Jp3+wnG8jlrgxIOh5iFuD hVp9JrCem27UcwUgg2iBBfT8NB6Jomt5S+QbEzMseRqTzjgs1Y1S/8oCxbiX8lxJWt2a mBGQyPsoBH9KVfbHon6bWtfZln50io1KCA//O3Qfacfn6h7ZomlqoopfaMzkuIlWwgW4 aPUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TxPXXdmG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si5426939iow.13.2021.06.16.23.19.38; Wed, 16 Jun 2021 23:19:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TxPXXdmG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbhFQGTw (ORCPT + 99 others); Thu, 17 Jun 2021 02:19:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:47324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhFQGTu (ORCPT ); Thu, 17 Jun 2021 02:19:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 22CE561245; Thu, 17 Jun 2021 06:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623910663; bh=Iej6rNHKIHWDbxNC0dw+JtSIrT0pe3am0Zc+QTlD5+Q=; h=From:To:Cc:Subject:Date:From; b=TxPXXdmGtKAuOPEwHE9jTELtT4aA1F8zUarhx9Pj3gpNcTCo64+tl2E1c5s3KiOGP +DwGVg4JqKyEP4udJPKGQMNcI4Wgl0PddA3CYpF2fskJE59I8XqZ1KleocqIQICyj4 StANrJCP5SfqPpbkJkdiQOZiuenYMMiSzPRS7EJFIg5srnOzWtgCNBpvfHlnsBlITs gvm9bjduCSbuLk0yEu2+wuZEMZc659a5KVdeDy+H7IBP/9Xz3lMQEDpfTaBKvmo+az ERuSFOohARgk80ZEgWXvr6O51MoYMzBQuaR/b5youIi/N8VSEXe/NsftxIpDA56GzI lqQKmPp8C/vZA== From: Nathan Chancellor To: James Smart , Ram Vegesna , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Nick Desaulniers , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session() Date: Wed, 16 Jun 2021 23:17:21 -0700 Message-Id: <20210617061721.2405511-1-nathan@kernel.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang warns: drivers/scsi/elx/efct/efct_lio.c:1216:24: warning: variable 'id' is uninitialized when used here [-Wuninitialized] se_sess, node, id); ^~ Shuffle the debug print after id's initialization so that the actual value is printed. Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines") Link: https://github.com/ClangBuiltLinux/linux/issues/1397 Signed-off-by: Nathan Chancellor --- drivers/scsi/elx/efct/efct_lio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c index e1bab2b17e4d..b7d69ff29c09 100644 --- a/drivers/scsi/elx/efct/efct_lio.c +++ b/drivers/scsi/elx/efct/efct_lio.c @@ -1212,12 +1212,12 @@ static void efct_lio_setup_session(struct work_struct *work) return; } - efc_log_debug(efct, "new initiator sess=%p node=%p id: %llx\n", - se_sess, node, id); - tgt_node = node->tgt_node; id = (u64) tgt_node->port_fc_id << 32 | tgt_node->node_fc_id; + efc_log_debug(efct, "new initiator sess=%p node=%p id: %llx\n", + se_sess, node, id); + if (xa_err(xa_store(&efct->lookup, id, tgt_node, GFP_KERNEL))) efc_log_err(efct, "Node lookup store failed\n"); base-commit: ebc076b3eddc807729bd81f7bc48e798a3ddc477 -- 2.32.0.93.g670b81a890