OSDN Git Service

scsi: efct: Remove useless DMA-32 fallback configuration
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 9 Jan 2022 18:57:04 +0000 (19:57 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 10 Jan 2022 15:37:02 +0000 (10:37 -0500)
commit1aa7d9799e85addc29c06ece99bf1eae1ef9198f
tree754c248d9d07c4a3417019a30e59b42f0f1f882d
parent706dc3b91989a1286b0eb75a1cd816596c590e5c
scsi: efct: 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 bits case will also
fail for the same reason.

Simplify code and remove some dead code accordingly.

While at it, return the error code returned by dma_set_mask_and_coherent()
instead of -1.

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

Link: https://lore.kernel.org/r/958bcb2a6e86344c14f38369e8e7079615a2b0e3.1641754613.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/elx/efct/efct_driver.c