[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211115055725.85631-1-chi.minghao@zte.com.cn>
Date: Mon, 15 Nov 2021 05:57:25 +0000
From: cgel.zte@...il.com
To: james.smart@...adcom.com
Cc: ram.vegesna@...adcom.com, jejb@...ux.ibm.com,
martin.petersen@...cle.com, dwagner@...e.de, hare@...e.de,
christophe.jaillet@...adoo.fr, chi.minghao@....com.cn,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org, Zeal Robot <zealci@....com.cm>
Subject: [PATCH] scsi:elx: fix cond_no_effect.cocci warnings
From: chiminghao <chi.minghao@....com.cn>
Fix the following coccicheck WARNING:
./drivers/scsi/elx/libefc_sli/sli4.c, 2320, 2-4, WARNING
possible condition with no effect (if == else)
Reported-by: Zeal Robot <zealci@....com.cm>
Signed-off-by: chiminghao <chi.minghao@....com.cn>
---
drivers/scsi/elx/libefc_sli/sli4.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/elx/libefc_sli/sli4.c b/drivers/scsi/elx/libefc_sli/sli4.c
index 907d67aeac23..b74065a4e5c1 100644
--- a/drivers/scsi/elx/libefc_sli/sli4.c
+++ b/drivers/scsi/elx/libefc_sli/sli4.c
@@ -2317,12 +2317,8 @@ sli_xmit_bls_rsp64_wqe(struct sli4 *sli, void *buf,
SLI4_GENERIC_CONTEXT_VPI << SLI4_BLS_RSP_WQE_CT_SHFT;
bls->context_tag = cpu_to_le16(params->vpi);
- if (params->s_id != U32_MAX)
- bls->local_n_port_id_dword |=
- cpu_to_le32(params->s_id & 0x00ffffff);
- else
- bls->local_n_port_id_dword |=
- cpu_to_le32(params->s_id & 0x00ffffff);
+ bls->local_n_port_id_dword |=
+ cpu_to_le32(params->s_id & 0x00ffffff);
dw_ridflags = (dw_ridflags & ~SLI4_BLS_RSP_RID) |
(params->d_id & SLI4_BLS_RSP_RID);
--
2.25.1
Powered by blists - more mailing lists