summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak R Varma <drv@mailo.com>2023-01-12 07:26:46 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2023-01-24 03:18:16 +0100
commit5a5ef64f28edda2d62109e9dfc87a9212f06bf5b (patch)
treeac095e499270a7a564ffa8151724ace243a1804c
parentscsi: qla2xxx: Use a variable for repeated mem_size computation (diff)
downloadlinux-5a5ef64f28edda2d62109e9dfc87a9212f06bf5b.tar.xz
linux-5a5ef64f28edda2d62109e9dfc87a9212f06bf5b.zip
scsi: qla2xxx: Simplify if condition evaluation
A logical evaluation of type (!A || A && B) can be simplified as (!A || B). Improvement by suggested by excluded_middle.cocci Coccinelel semantic patch. Link: https://lore.kernel.org/r/Y7+oJuah0MgEW0PQ@ubun2204.myguest.virtualbox.org Signed-off-by: Deepak R Varma <drv@mailo.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index dbd6660c0bf8..aa0cf5ca6c1c 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -1012,8 +1012,7 @@ void qlt_free_session_done(struct work_struct *work)
}
if (ha->flags.edif_enabled &&
- (!own || (own &&
- own->iocb.u.isp24.status_subcode == ELS_PLOGI))) {
+ (!own || own->iocb.u.isp24.status_subcode == ELS_PLOGI)) {
sess->edif.authok = 0;
if (!ha->flags.host_shutting_down) {
ql_dbg(ql_dbg_edif, vha, 0x911e,