diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-06-16 23:17:21 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-18 23:01:04 -0400 |
commit | a25503617834920e772b9abda608d902dbf26b5c (patch) | |
tree | 4881d481ec136d7a50d1903537654d43cba5d0b4 /drivers/scsi/elx/efct | |
parent | 41962aba2dc622b456aaf3c20e1089084714f73f (diff) |
scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session()
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.
Link: https://github.com/ClangBuiltLinux/linux/issues/1397
Link: https://lore.kernel.org/r/20210617061721.2405511-1-nathan@kernel.org
Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines")
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/elx/efct')
-rw-r--r-- | drivers/scsi/elx/efct/efct_lio.c | 6 |
1 files 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"); |