kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 2/3] [SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag
@ 2014-12-19 12:40 Quentin Lambert
  0 siblings, 0 replies; only message in thread
From: Quentin Lambert @ 2014-12-19 12:40 UTC (permalink / raw)
  To: joe
  Cc: Nagalakshmi Nandigama, Praveen Krishnamoorthy, Sreekanth Reddy,
	Abhijit Mahajan, James E.J. Bottomley, MPT-FusionLinux.pdl,
	linux-scsi, kernel-janitors, linux-kernel

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

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index a6f89fd..6162a89 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -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;
 		}
 	}
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-19 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19 12:40 [PATCH v2 2/3] [SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag Quentin Lambert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).