Skip to contentSkip to conversation

scsi: pm80xx: Replace open coded check with dev_is_expander()

PATCH Applied Igor Pylypiv 3 participants 4 messages Sep 29, 2021 – Oct 12, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 scsi: pm80xx: Replace open coded check with dev_is_expander()

This is a follow up cleanup to the commit 924a3541eab0 ("scsi: libsas:
aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()")

---
 drivers/scsi/pm8001/pm8001_hwi.c | 3 +--
 drivers/scsi/pm8001/pm80xx_hwi.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +1 -2
index 63690508313b..b73d286bea60 100644
@@ -4476,8 +4476,7 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
 		if (pm8001_dev->dev_type == SAS_SATA_DEV)
 			stp_sspsmp_sata = 0x00; /* stp*/
 		else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
-			pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE ||
-			pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
+			dev_is_expander(pm8001_dev->dev_type))
 			stp_sspsmp_sata = 0x01; /*ssp or smp*/
 	}
 	if (parent_dev && dev_is_expander(parent_dev->dev_type))
drivers/scsi/pm8001/pm80xx_hwi.c +1 -2
index 6ffe17b849ae..778b5fce876b 100644
@@ -4825,8 +4825,7 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
 		if (pm8001_dev->dev_type == SAS_SATA_DEV)
 			stp_sspsmp_sata = 0x00; /* stp*/
 		else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
-			pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE ||
-			pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
+			dev_is_expander(pm8001_dev->dev_type))
 			stp_sspsmp_sata = 0x01; /*ssp or smp*/
 	}
 	if (parent_dev && dev_is_expander(parent_dev->dev_type))
Signature · 1 line
2.33.0.685.g46640cef36-goog
Acked-by on v1 1/2
#1 lore raw
Quoted 6 lines · Igor Pylypiv

This is a follow up cleanup to the commit 924a3541eab0 ("scsi: libsas:
aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()")

Quoted 36 lines
---
 drivers/scsi/pm8001/pm8001_hwi.c | 3 +--
 drivers/scsi/pm8001/pm80xx_hwi.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +1 -2
index 63690508313b..b73d286bea60 100644
@@ -4476,8 +4476,7 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
                if (pm8001_dev->dev_type == SAS_SATA_DEV)
                        stp_sspsmp_sata = 0x00; /* stp*/
                else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
-                       pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE ||
-                       pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
+                       dev_is_expander(pm8001_dev->dev_type))
                        stp_sspsmp_sata = 0x01; /*ssp or smp*/
        }
        if (parent_dev && dev_is_expander(parent_dev->dev_type))
drivers/scsi/pm8001/pm80xx_hwi.c +1 -3
index 6ffe17b849ae..778b5fce876b 100644
@@ -4825,8 +4825,7 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
                if (pm8001_dev->dev_type == SAS_SATA_DEV)
                        stp_sspsmp_sata = 0x00; /* stp*/
                else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
-                       pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE ||
-                       pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
+                       dev_is_expander(pm8001_dev->dev_type))
                        stp_sspsmp_sata = 0x01; /*ssp or smp*/
        }
        if (parent_dev && dev_is_expander(parent_dev->dev_type))
--

2.33.0.685.g46640cef36-goog

#2 lore raw
In reply to Igor Pylypiv

Igor,

Quoted 2 lines

This is a follow up cleanup to the commit 924a3541eab0 ("scsi: libsas:
aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()")

Applied 1+2 to 5.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering