Commit 02a386df authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: mpt3sas: open-code _scsih_scsi_lookup_get()

Just a wrapper around the scsi lookup array and only used in one place,
so open-code it.
Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6a2d4618
...@@ -1444,19 +1444,6 @@ _scsih_is_nvme_device(u32 device_info) ...@@ -1444,19 +1444,6 @@ _scsih_is_nvme_device(u32 device_info)
return 0; return 0;
} }
/**
* _scsih_scsi_lookup_get - returns scmd entry
* @ioc: per adapter object
* @smid: system request message index
*
* Returns the smid stored scmd pointer.
*/
static struct scsi_cmnd *
_scsih_scsi_lookup_get(struct MPT3SAS_ADAPTER *ioc, u16 smid)
{
return ioc->scsi_lookup[smid - 1].scmd;
}
/** /**
* __scsih_scsi_lookup_get_clear - returns scmd entry without * __scsih_scsi_lookup_get_clear - returns scmd entry without
* holding any lock. * holding any lock.
...@@ -7543,7 +7530,7 @@ _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc, ...@@ -7543,7 +7530,7 @@ _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc,
for (smid = 1; smid <= ioc->scsiio_depth; smid++) { for (smid = 1; smid <= ioc->scsiio_depth; smid++) {
if (ioc->shost_recovery) if (ioc->shost_recovery)
goto out; goto out;
scmd = _scsih_scsi_lookup_get(ioc, smid); scmd = ioc->scsi_lookup[smid - 1].scmd;
if (!scmd) if (!scmd)
continue; continue;
sdev = scmd->device; sdev = scmd->device;
......
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