Commit 4f632918 authored by Igor Pylypiv's avatar Igor Pylypiv Committed by Martin K. Petersen

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

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

Link: https://lore.kernel.org/r/20210929025807.646589-1-ipylypiv@google.comReviewed-by: default avatarVishakha Channapattan <vishakhavc@google.com>
Acked-by: default avatarJack Wang <jinpu.wang@ionos.com>
Signed-off-by: default avatarIgor Pylypiv <ipylypiv@google.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c20bda34
...@@ -4481,8 +4481,7 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, ...@@ -4481,8 +4481,7 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
if (pm8001_dev->dev_type == SAS_SATA_DEV) if (pm8001_dev->dev_type == SAS_SATA_DEV)
stp_sspsmp_sata = 0x00; /* stp*/ stp_sspsmp_sata = 0x00; /* stp*/
else if (pm8001_dev->dev_type == SAS_END_DEVICE || else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE || dev_is_expander(pm8001_dev->dev_type))
pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
stp_sspsmp_sata = 0x01; /*ssp or smp*/ stp_sspsmp_sata = 0x01; /*ssp or smp*/
} }
if (parent_dev && dev_is_expander(parent_dev->dev_type)) if (parent_dev && dev_is_expander(parent_dev->dev_type))
......
...@@ -4865,8 +4865,7 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, ...@@ -4865,8 +4865,7 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
if (pm8001_dev->dev_type == SAS_SATA_DEV) if (pm8001_dev->dev_type == SAS_SATA_DEV)
stp_sspsmp_sata = 0x00; /* stp*/ stp_sspsmp_sata = 0x00; /* stp*/
else if (pm8001_dev->dev_type == SAS_END_DEVICE || else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE || dev_is_expander(pm8001_dev->dev_type))
pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
stp_sspsmp_sata = 0x01; /*ssp or smp*/ stp_sspsmp_sata = 0x01; /*ssp or smp*/
} }
if (parent_dev && dev_is_expander(parent_dev->dev_type)) if (parent_dev && dev_is_expander(parent_dev->dev_type))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment