Skip to content

Commit 8001fa2

Browse files
tititiou36martinkpetersen
authored andcommitted
scsi: hisi_sas: Remove useless DMA-32 fallback configuration
As stated in [1], dma_set_mask() with a 64-bit mask never fails if dev->dma_mask is non-NULL. So, if it fails, the 32-bit case will also fail for the same reason. Simplify code and remove some dead code accordingly. [1]: https://lore.kernel.org/linux-kernel/[email protected]/#t Link: https://lore.kernel.org/r/1bf2d3660178b0e6f172e5208bc0bd68d31d9268.1642237482.git.christophe.jaillet@wanadoo.fr Acked-by: John Garry <[email protected]> Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent fb8d5ea commit 8001fa2

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,9 +2666,6 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,
26662666
goto err_out;
26672667

26682668
error = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
2669-
if (error)
2670-
error = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
2671-
26722669
if (error) {
26732670
dev_err(dev, "No usable DMA addressing method\n");
26742671
goto err_out;

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4695,8 +4695,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
46954695
goto err_out;
46964696

46974697
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
4698-
if (rc)
4699-
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
47004698
if (rc) {
47014699
dev_err(dev, "No usable DMA addressing method\n");
47024700
rc = -ENODEV;

0 commit comments

Comments
 (0)