Skip to contentSkip to conversation

mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag

PATCH New Quentin Lambert 1 participant 1 message Dec 19, 2014

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

PATCH v2 2/3 mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag

Since skip was only used to pass through the rest of the loop, a break statment is called where skip was previously assigned 1.

---
 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -4
index a6f89fd..6162a89 100644
@@ -2265,18 +2265,15 @@ mpt2sas_scsih_tm_flag(struct MPT2SAS_ADAPTER *ioc, u16 handle, u8 action)
 {
 	struct MPT2SAS_DEVICE *sas_device_priv_data;
 	struct scsi_device *sdev;
-	u8 skip = 0;
 
 	shost_for_each_device(sdev, ioc->shost) {
-		if (skip)
-			continue;
 		sas_device_priv_data = sdev->hostdata;
 		if (!sas_device_priv_data)
 			continue;
 		if (sas_device_priv_data->sas_target->handle = handle) {
 			sas_device_priv_data->sas_target->tm_busy = action;
-			skip = 1;
 			ioc->ignore_loginfos = action;
+			break;
 		}
 	}
 }
Signature · 1 line
1.9.1