From patchwork Sat Jan 15 07:35:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12714337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 570B9C433F5 for ; Sat, 15 Jan 2022 07:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=srB7WnM+puLMW77nLqR5UU8eh87O3J11p2Lc2Qcz00o=; b=q/Px0F70nyaePU r3EWI9emVdx5gDh101enp6floljKQXR/CfG8SINwnETUBlk8vfBdclYhIKyi52PwSwFf0oTYdrh0g RKmEcJd0OahQXX2JOY/wTPfrmE7m5EVGzBWsnqtyg3yDqfSURzgz1gFfIiORNrVZj3/VpwPB8WME7 XWWRHsGQ0uUNbifBmTPvR6TgrWvZvkvR2yEspxiQOTtVopmnynrbSwQ+CaCVK6S/3P4d+qIKZ74B1 9bToOjaXSvp7GIm02loEYQCd/W6xqkw8OWnpDmvVhe+XQMUk7PFlPTFuOb3e7n4FMDLK80MuGda48 UsOGcuKGQTW0z89o3e1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8db4-00Als5-78; Sat, 15 Jan 2022 07:35:34 +0000 Received: from smtp03.smtpout.orange.fr ([80.12.242.125] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8db0-00Alqv-FA for linux-arm-kernel@lists.infradead.org; Sat, 15 Jan 2022 07:35:32 +0000 Received: from pop-os.home ([90.126.236.122]) by smtp.orange.fr with ESMTPA id 8darniBFzhTNk8darn3hMm; Sat, 15 Jan 2022 08:35:24 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 15 Jan 2022 08:35:24 +0100 X-ME-IP: 90.126.236.122 From: Christophe JAILLET To: Sinan Kaya , Andy Gross , Bjorn Andersson , Vinod Koul Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH v2] dmaengine: qcom_hidma: Remove useless DMA-32 fallback configuration Date: Sat, 15 Jan 2022 08:35:20 +0100 Message-Id: <4deb32b0c7838da66608022c584326eb01d0da03.1642232106.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220114_233530_685187_6B5D3C0D X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-By: Sinan Kaya --- v2: have the subject and updated driver match --- drivers/dma/qcom/hidma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 65d054bb11aa..51587cf8196b 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -838,9 +838,7 @@ static int hidma_probe(struct platform_device *pdev) rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (rc) { dev_warn(&pdev->dev, "unable to set coherent mask to 64"); - rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); - if (rc) - goto dmafree; + goto dmafree; } dmadev->lldev = hidma_ll_init(dmadev->ddev.dev,