Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: bfa: 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/YL3vSPK5DXTNvgdx@infradead.org/#t

Link: https://lore.kernel.org/r/5663cef9b54004fa56cca7ce65f51eadfc3ecddb.1642238127.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christophe JAILLET and committed by
Martin K. Petersen
012d98da 8001fa24

-6
-6
drivers/scsi/bfa/bfad.c
··· 732 732 pci_set_master(pdev); 733 733 734 734 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 735 - if (rc) 736 - rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 737 - 738 735 if (rc) { 739 736 rc = -ENODEV; 740 737 printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", pdev); ··· 1556 1559 pci_set_master(pdev); 1557 1560 1558 1561 rc = dma_set_mask_and_coherent(&bfad->pcidev->dev, DMA_BIT_MASK(64)); 1559 - if (rc) 1560 - rc = dma_set_mask_and_coherent(&bfad->pcidev->dev, 1561 - DMA_BIT_MASK(32)); 1562 1562 if (rc) 1563 1563 goto out_disable_device; 1564 1564