summaryrefslogtreecommitdiff
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2019-06-10 20:41:41 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-06-20 15:37:02 -0400
commit924a3541eab0d28101baf0831e4315593f06ba4a (patch)
treeda4ef5d394c324e91279650a8cc4ee34da7b3694 /include/scsi/libsas.h
parent895d8860a1a9b13ebddccb76a70faf4c01081699 (diff)
scsi: libsas: aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()
Many times in libsas, and in LLDDs which use libsas, the check for an expander device is re-implemented or open coded. Use dev_is_expander() instead. We rename this from sas_dev_type_is_expander() to not spill so many lines in referencing. Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 901355a1bc53..a8565a87291d 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -207,8 +207,7 @@ struct sas_work {
struct work_struct work;
};
-/* Lots of code duplicates this in the SCSI tree, which can be factored out */
-static inline bool sas_dev_type_is_expander(enum sas_device_type type)
+static inline bool dev_is_expander(enum sas_device_type type)
{
return type == SAS_EDGE_EXPANDER_DEVICE ||
type == SAS_FANOUT_EXPANDER_DEVICE;