diff mbox series

scsi: lpfc: Remove useless DMA-32 fallback configuration

Message ID 20220318005817.2141903-1-chi.minghao@zte.com.cn (mailing list archive)
State New, archived
Headers show
Series scsi: lpfc: Remove useless DMA-32 fallback configuration | expand

Commit Message

CGEL March 18, 2022, 12:58 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.

Simplify code and remove some dead code accordingly.

[1]: https://lkml.org/lkml/2021/6/7/398

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/scsi/lpfc/lpfc_init.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index f5c363f663f6..e793c4183499 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9187,8 +9187,6 @@  lpfc_sli_pci_mem_setup(struct lpfc_hba *phba)
 
 	/* Set the device DMA mask size */
 	error = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
-	if (error)
-		error = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
 	if (error)
 		return error;
 	error = -ENODEV;
@@ -11714,8 +11712,6 @@  lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
 
 	/* Set the device DMA mask size */
 	error = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
-	if (error)
-		error = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
 	if (error)
 		return error;