Skip to content

Commit

Permalink
scsi: mpt3sas: open-code _scsih_scsi_lookup_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Reinecke authored and Martin K. Petersen committed Jan 11, 2018
1 parent 6a2d461 commit 02a386d
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/scsi/mpt3sas/mpt3sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 02a386d

Please sign in to comment.