scsi: bfa: Remove useless DMA-32 fallback configuration
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 15 Jan 2022 09:15:41 +0000 (10:15 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Jan 2022 04:30:29 +0000 (23:30 -0500)
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>
drivers/scsi/bfa/bfad.c

index 440ef32be048fee51aad6c7380d72778b09fe6ed..e5aa982ffedc3405c115b9fa441c87bf079d9a3d 100644 (file)
@@ -732,9 +732,6 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
        pci_set_master(pdev);
 
        rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
-       if (rc)
-               rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
-
        if (rc) {
                rc = -ENODEV;
                printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", pdev);
@@ -1559,9 +1556,6 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
        pci_set_master(pdev);
 
        rc = dma_set_mask_and_coherent(&bfad->pcidev->dev, DMA_BIT_MASK(64));
-       if (rc)
-               rc = dma_set_mask_and_coherent(&bfad->pcidev->dev,
-                                              DMA_BIT_MASK(32));
        if (rc)
                goto out_disable_device;