Messages in this thread Patch in this message | | | From | cgel.zte@gmail ... | Subject | [PATCH] scsi: lpfc: Remove useless DMA-32 fallback configuration | Date | Fri, 18 Mar 2022 00:58:17 +0000 |
| |
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 --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; -- 2.25.1
| |