Re: [PATCH 3/3] dmaengine: sprd: Remove obsolete 32-bit DMA mask fallback

From: Frank Li

Date: Wed Oct 21 2026 - 13:06:07 EST


On Thu, Sep 03, 2026 at 07:54:41PM +0800, Ruizhe Zhou wrote:
> The DMA API guarantees support for masks of 32 bits or wider and
> explicitly identifies retrying a 32-bit mask after a wider request as
> incorrect:
> https://docs.kernel.org/core-api/dma-api-howto.html#dma-addressing-capabilities
>
> Remove the obsolete fallback while retaining the error check so that a
> genuine DMA setup failure is still reported and aborts initialization.
>
> Signed-off-by: Ruizhe Zhou <zhouruizhe@xxxxxxxxxxx>
> ---

Eventhough needn't check when 36bit, but remove fallback is correct.

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>

> drivers/dma/sprd-dma.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 087fea3af2e4..b9f705dd80e5 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1117,11 +1117,8 @@ static int sprd_dma_probe(struct platform_device *pdev)
>
> ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36));
> if (ret) {
> - ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> - if (ret) {
> - dev_err(&pdev->dev, "unable to set coherent mask to 32\n");
> - return ret;
> - }
> + dev_err(&pdev->dev, "unable to set 36-bit DMA mask\n");
> + return ret;
> }
>
> /* Parse new and deprecated dma-channels properties */
> --
> 2.27.0
>