Skip to content

Commit 012d98d

Browse files
tititiou36martinkpetersen
authored andcommitted
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/[email protected]/#t Link: https://lore.kernel.org/r/5663cef9b54004fa56cca7ce65f51eadfc3ecddb.1642238127.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 8001fa2 commit 012d98d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/scsi/bfa/bfad.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,9 +732,6 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
732732
pci_set_master(pdev);
733733

734734
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-
738735
if (rc) {
739736
rc = -ENODEV;
740737
printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", pdev);
@@ -1559,9 +1556,6 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
15591556
pci_set_master(pdev);
15601557

15611558
rc = dma_set_mask_and_coherent(&bfad->pcidev->dev, DMA_BIT_MASK(64));
1562-
if (rc)
1563-
rc = dma_set_mask_and_coherent(&bfad->pcidev->dev,
1564-
DMA_BIT_MASK(32));
15651559
if (rc)
15661560
goto out_disable_device;
15671561

0 commit comments

Comments
 (0)