[openwrt/openwrt] ramips: 6.1: mt7621-dma: apply dma handle error from device_reset patch

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 10 04:09:13 PST 2024


nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0561613319f403dc139c339790511682785e2cfc

commit 0561613319f403dc139c339790511682785e2cfc
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Fri May 26 20:04:25 2023 +0200

    ramips: 6.1: mt7621-dma: apply dma handle error from device_reset patch
    
    Apply the "109-drivers-mt7621-dma-handle-error-from-device_reset.patch"
    directly on the downstream maintained dma driver.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 .../files/drivers/dma/mediatek/hsdma-mt7621.c      |  4 ++-
 ...mt7621-dma-handle-error-from-device_reset.patch | 31 ----------------------
 2 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c b/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c
index 8aebced277..a3a9a7f4ae 100644
--- a/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c
+++ b/target/linux/ramips/files/drivers/dma/mediatek/hsdma-mt7621.c
@@ -680,7 +680,9 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	device_reset(&pdev->dev);
+	ret = device_reset(&pdev->dev);
+	if (ret)
+		dev_err(&pdev->dev, "failed to reset device\n");
 
 	dd = &hsdma->ddev;
 	dma_cap_set(DMA_MEMCPY, dd->cap_mask);
diff --git a/target/linux/ramips/patches-6.1/109-drivers-mt7621-dma-handle-error-from-device_reset.patch b/target/linux/ramips/patches-6.1/109-drivers-mt7621-dma-handle-error-from-device_reset.patch
deleted file mode 100644
index a4543337ff..0000000000
--- a/target/linux/ramips/patches-6.1/109-drivers-mt7621-dma-handle-error-from-device_reset.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 3f6dfa25128e428acfba20792bc7506d58806baa Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sun, 7 May 2023 01:06:17 +0200
-Subject: [PATCH] drivers: mt7621-dma: handle error from device_reset
-
-Handle error from device reset to fix compilation warning.
-Fix compilation warning:
-drivers/staging/mt7621-dma/hsdma-mt7621.c: In function 'mtk_hsdma_probe':
-drivers/staging/mt7621-dma/hsdma-mt7621.c:685:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
-  685 |         device_reset(&pdev->dev);
-      |         ^~~~~~~~~~~~~~~~~~~~~~~~
-cc1: all warnings being treated as errors
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- drivers/staging/mt7621-dma/hsdma-mt7621.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/drivers/staging/mt7621-dma/hsdma-mt7621.c
-+++ b/drivers/staging/mt7621-dma/hsdma-mt7621.c
-@@ -682,7 +682,9 @@ static int mtk_hsdma_probe(struct platfo
- 		return ret;
- 	}
- 
--	device_reset(&pdev->dev);
-+	ret = device_reset(&pdev->dev);
-+	if (ret)
-+		dev_err(&pdev->dev, "failed to reset device\n");
- 
- 	dd = &hsdma->ddev;
- 	dma_cap_set(DMA_MEMCPY, dd->cap_mask);




More information about the lede-commits mailing list