aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-05-07 01:13:45 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-05-12 03:15:39 +0200
commitda2f5e8776da6ca7ca5ae9646243dc0f04ce24b9 (patch)
tree1493a75aaf2fdd02f31fbad3ff0426b5c5915a12
parent82afdf6056e747b0780511fb149e57d5247e6daf (diff)
downloadupstream-da2f5e8776da6ca7ca5ae9646243dc0f04ce24b9.tar.gz
upstream-da2f5e8776da6ca7ca5ae9646243dc0f04ce24b9.tar.bz2
upstream-da2f5e8776da6ca7ca5ae9646243dc0f04ce24b9.zip
ramips: 5.15: add patch fixing compilation warning for hsdma-mt7621
Add patch fixing compilation warning for hsdma-mt7621: 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@gmail.com>
-rw-r--r--target/linux/ramips/patches-5.15/109-drivers-mt7621-dma-handle-error-from-device_reset.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-5.15/109-drivers-mt7621-dma-handle-error-from-device_reset.patch b/target/linux/ramips/patches-5.15/109-drivers-mt7621-dma-handle-error-from-device_reset.patch
new file mode 100644
index 0000000000..a4543337ff
--- /dev/null
+++ b/target/linux/ramips/patches-5.15/109-drivers-mt7621-dma-handle-error-from-device_reset.patch
@@ -0,0 +1,31 @@
+From 3f6dfa25128e428acfba20792bc7506d58806baa Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth@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@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);