diff options
author | Rajeshwar R Shinde <coolrrsh@gmail.com> | 2023-08-17 17:13:01 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-08-21 17:13:56 -0400 |
commit | 2d6f70fe175e342d29ee1103523551bb224981d4 (patch) | |
tree | 6596853feb4b839f8d4aac99c0d86c5ae2c5ccc4 /drivers/scsi/elx/libefc_sli/sli4.c | |
parent | 56a4d69a26c9bc77f4697692b6f7223e09f9de1a (diff) | |
download | linux-stable-2d6f70fe175e342d29ee1103523551bb224981d4.tar.gz linux-stable-2d6f70fe175e342d29ee1103523551bb224981d4.tar.bz2 linux-stable-2d6f70fe175e342d29ee1103523551bb224981d4.zip |
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 <coolrrsh@gmail.com>
Link: https://lore.kernel.org/r/20230817114301.17601-1-coolrrsh@gmail.com
Reviewed-by: Ram Vegesna <ram.vegesna@broadcom.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/elx/libefc_sli/sli4.c')
-rw-r--r-- | drivers/scsi/elx/libefc_sli/sli4.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/elx/libefc_sli/sli4.c b/drivers/scsi/elx/libefc_sli/sli4.c index 8f96049f62dd..5e7fb110bc3f 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); |