Commit 2d6f70fe authored by Rajeshwar R Shinde's avatar Rajeshwar R Shinde Committed by Martin K. Petersen

scsi: elx: sli4: Remove code duplication

In the function sli_xmit_bls_rsp64_wqe(), the 'if' and 'else' conditions
evaluates the same expression and give the same output. Also, params->s_id
shall not be equal to U32_MAX. Remove the unused code.

This fixes coccinelle warning such as:
drivers/scsi/elx/libefc_sli/sli4.c:2320:2-4: WARNING: possible
condition with no effect (if == else)
Signed-off-by: default avatarRajeshwar R Shinde <coolrrsh@gmail.com>
Link: https://lore.kernel.org/r/20230817114301.17601-1-coolrrsh@gmail.comReviewed-by: default avatarRam Vegesna <ram.vegesna@broadcom.com>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 56a4d69a
......@@ -2317,10 +2317,6 @@ 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment