Skip to content

Commit 2d6f70f

Browse files
rajeshwar-shindemartinkpetersen
authored andcommitted
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: Rajeshwar R Shinde <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ram Vegesna <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 56a4d69 commit 2d6f70f

File tree

1 file changed

+2
-6
lines changed
  • drivers/scsi/elx/libefc_sli

1 file changed

+2
-6
lines changed

drivers/scsi/elx/libefc_sli/sli4.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,12 +2317,8 @@ sli_xmit_bls_rsp64_wqe(struct sli4 *sli, void *buf,
23172317
SLI4_GENERIC_CONTEXT_VPI << SLI4_BLS_RSP_WQE_CT_SHFT;
23182318
bls->context_tag = cpu_to_le16(params->vpi);
23192319

2320-
if (params->s_id != U32_MAX)
2321-
bls->local_n_port_id_dword |=
2322-
cpu_to_le32(params->s_id & 0x00ffffff);
2323-
else
2324-
bls->local_n_port_id_dword |=
2325-
cpu_to_le32(params->s_id & 0x00ffffff);
2320+
bls->local_n_port_id_dword |=
2321+
cpu_to_le32(params->s_id & 0x00ffffff);
23262322

23272323
dw_ridflags = (dw_ridflags & ~SLI4_BLS_RSP_RID) |
23282324
(params->d_id & SLI4_BLS_RSP_RID);

0 commit comments

Comments
 (0)