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

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.comSigned-off-by: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e238e71b
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment