Skip to content

Commit 7326bf8

Browse files
tititiou36vinodkoul
authored andcommitted
dmaengine: altera-msgdma: 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. [1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Olivier Dautricourt <olivier.dautricourt@orolia.com> Link: https://lore.kernel.org/r/01058ada3a0dea207212182ca7525060a204f1e1.1642232423.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 728f6c7 commit 7326bf8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/dma/altera-msgdma.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,7 @@ static int msgdma_probe(struct platform_device *pdev)
891891
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
892892
if (ret) {
893893
dev_warn(&pdev->dev, "unable to set coherent mask to 64");
894-
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
895-
if (ret)
896-
goto fail;
894+
goto fail;
897895
}
898896

899897
msgdma_reset(mdev);

0 commit comments

Comments
 (0)