Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Deepak R Varma and committed by
Martin K. Petersen
5a5ef64f 4fd62973

+1 -2
+1 -2
drivers/scsi/qla2xxx/qla_target.c
··· 1012 1012 } 1013 1013 1014 1014 if (ha->flags.edif_enabled && 1015 - (!own || (own && 1016 - own->iocb.u.isp24.status_subcode == ELS_PLOGI))) { 1015 + (!own || own->iocb.u.isp24.status_subcode == ELS_PLOGI)) { 1017 1016 sess->edif.authok = 0; 1018 1017 if (!ha->flags.host_shutting_down) { 1019 1018 ql_dbg(ql_dbg_edif, vha, 0x911e,