scsi: mpt3sas: open-code _scsih_scsi_lookup_get()
authorHannes Reinecke <hare@suse.de>
Thu, 4 Jan 2018 12:57:04 +0000 (04:57 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 11 Jan 2018 04:25:00 +0000 (23:25 -0500)
Just a wrapper around the scsi lookup array and only used in one place,
so open-code it.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c

index 9a2cede27402778b5db75909260680f19fef53ce..e482fa2969748f37b9268501acec30220badcefb 100644 (file)
@@ -1444,19 +1444,6 @@ _scsih_is_nvme_device(u32 device_info)
                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
  *                                             holding any lock.
@@ -7543,7 +7530,7 @@ _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc,
        for (smid = 1; smid <= ioc->scsiio_depth; smid++) {
                if (ioc->shost_recovery)
                        goto out;
-               scmd = _scsih_scsi_lookup_get(ioc, smid);
+               scmd = ioc->scsi_lookup[smid - 1].scmd;
                if (!scmd)
                        continue;
                sdev = scmd->device;