All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: csiostor: Remove useless DMA-32 fallback configuration
@ 2022-03-17  7:03 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-03-17  7:03 UTC (permalink / raw)
  To: jejb; +Cc: martin.petersen, linux-scsi, linux-kernel, Minghao Chi, Zeal Robot

From: Minghao Chi <chi.minghao@zte.com.cn>

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 bits 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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/scsi/csiostor/csio_init.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index ccbded3353bd..d44cd6da8cb4 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -204,8 +204,6 @@ csio_pci_init(struct pci_dev *pdev, int *bars)
 	pci_try_set_mwi(pdev);
 
 	rv = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
-	if (rv)
-		rv = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
 	if (rv) {
 		rv = -ENODEV;
 		dev_err(&pdev->dev, "No suitable DMA available.\n");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-17  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17  7:03 [PATCH] scsi: csiostor: Remove useless DMA-32 fallback configuration cgel.zte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.