scsi: mpt3sas: Introduce mpt3sas_get_st_from_smid()
Abstract accesses to the scsi_lookup array by introducing mpt3sas_get_st_from_smid(). 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>
This commit is contained in:

committed by
Martin K. Petersen

parent
02a386df36
commit
12e7c6782b
@@ -270,7 +270,9 @@ out_error:
|
||||
inline u8
|
||||
mpt3sas_scsi_direct_io_get(struct MPT3SAS_ADAPTER *ioc, u16 smid)
|
||||
{
|
||||
return ioc->scsi_lookup[smid - 1].direct_io;
|
||||
struct scsiio_tracker *st = mpt3sas_get_st_from_smid(ioc, smid);
|
||||
|
||||
return st ? st->direct_io : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user