* [PATCH] scsi:elx: fix cond_no_effect.cocci warnings
@ 2021-11-15 5:57 cgel.zte
2021-11-30 4:29 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-15 5:57 UTC (permalink / raw)
To: james.smart
Cc: ram.vegesna, jejb, martin.petersen, dwagner, hare,
christophe.jaillet, chi.minghao, linux-scsi, target-devel,
linux-kernel, Zeal Robot
From: chiminghao <chi.minghao@zte.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@zte.com.cm>
Signed-off-by: chiminghao <chi.minghao@zte.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi:elx: fix cond_no_effect.cocci warnings
2021-11-15 5:57 [PATCH] scsi:elx: fix cond_no_effect.cocci warnings cgel.zte
@ 2021-11-30 4:29 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-11-30 4:29 UTC (permalink / raw)
To: cgel.zte
Cc: james.smart, ram.vegesna, jejb, martin.petersen, dwagner, hare,
christophe.jaillet, chi.minghao, linux-scsi, target-devel,
linux-kernel, Zeal Robot
> From: chiminghao <chi.minghao@zte.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)
The patch attribution is confusing.
Patch was submitted by <cgel.zte@gmail.com> but there is no signoff tag
reflecting this.
> Reported-by: Zeal Robot <zealci@zte.com.cm>
.cm?
> Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-30 4:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-15 5:57 [PATCH] scsi:elx: fix cond_no_effect.cocci warnings cgel.zte
2021-11-30 4:29 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox