Commit 78ca7003 authored by Sreekanth Reddy's avatar Sreekanth Reddy Committed by Martin K. Petersen
Browse files

scsi: mpt3sas: Rearrange _scsih_mark_responding_sas_device()

Rearrange _scsih_mark_responding_sas_device function. No functional change.

Link: https://lore.kernel.org/r/20201027130847.9962-4-sreekanth.reddy@broadcom.com


Signed-off-by: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e238e71b
Loading
Loading
Loading
Loading
+58 −58
Original line number Diff line number Diff line
@@ -8742,9 +8742,11 @@ Mpi2SasDevicePage0_t *sas_device_pg0)
	}
	spin_lock_irqsave(&ioc->sas_device_lock, flags);
	list_for_each_entry(sas_device, &ioc->sas_device_list, list) {
		if ((sas_device->sas_address == le64_to_cpu(
		    sas_device_pg0->SASAddress)) && (sas_device->slot ==
		    le16_to_cpu(sas_device_pg0->Slot))) {
		if (sas_device->sas_address != le64_to_cpu(
		    sas_device_pg0->SASAddress))
			continue;
		if (sas_device->slot != le16_to_cpu(sas_device_pg0->Slot))
			continue;
		sas_device->responding = 1;
		starget = sas_device->starget;
		if (starget && starget->hostdata) {
@@ -8762,8 +8764,7 @@ Mpi2SasDevicePage0_t *sas_device_pg0)

			if (sas_device->enclosure_handle != 0)
				starget_printk(KERN_INFO, starget,
					 "enclosure logical id(0x%016llx),"
					 " slot(%d)\n",
				 "enclosure logical id(0x%016llx), slot(%d)\n",
				 (unsigned long long)
				 sas_device->enclosure_logical_id,
				 sas_device->slot);
@@ -8805,7 +8806,6 @@ Mpi2SasDevicePage0_t *sas_device_pg0)
			    le16_to_cpu(sas_device_pg0->DevHandle);
		goto out;
	}
	}
 out:
	spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
}