Skip to contentSkip to conversation

Revert "Revert "scsi: megaraid_sas: Simplify the calculation of variables

PATCH New Jiapeng Chong 1 participant 1 message Jan 29, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "Revert "scsi: megaraid_sas: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/scsi/megaraid/megaraid_sas_base.c:8644:30-32: WARNING !A || A && B is equivalent to !A || B.

---
 drivers/scsi/megaraid/megaraid_sas_base.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +1 -2
index 63a4f48..dd26107 100644
@@ -8641,8 +8641,7 @@ int megasas_update_device_list(struct megasas_instance *instance,
 
 		if (event_type & SCAN_VD_CHANNEL) {
 			if (!instance->requestorId ||
-			    (instance->requestorId &&
-			     megasas_get_ld_vf_affiliation(instance, 0))) {
+			     megasas_get_ld_vf_affiliation(instance, 0)) {
 				dcmd_ret = megasas_ld_list_query(instance,
 						MR_LD_QUERY_TYPE_EXPOSED_TO_HOST);
 				if (dcmd_ret != DCMD_SUCCESS)
Signature · 1 line
1.8.3.1