From: Tzung-Bi Shih <tzungbi@google.com>
To: ohad@wizery.com, bjorn.andersson@linaro.org
Cc: drinkcat@google.com, kernel test robot <lkp@intel.com>,
groeck@google.com, pihsun@google.com,
linux-remoteproc@vger.kernel.org, tzungbi@google.com,
linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] remoteproc/mediatek: fix sparse errors
Date: Mon, 16 Nov 2020 12:41:21 +0800 [thread overview]
Message-ID: <20201116044121.2457272-1-tzungbi@google.com> (raw)
Fixes the following sparse errors:
warning: incorrect type in argument 2 (different address spaces)
expected void volatile [noderef] __iomem *addr
got void *addr
warning: incorrect type in argument 1 (different address spaces)
expected void *addr
got void [noderef] __iomem *
warning: incorrect type in assignment (different address spaces)
expected void [noderef] __iomem *cpu_addr
got void *
warning: incorrect type in argument 3 (different address spaces)
expected void *cpu_addr
got void [noderef] __iomem *cpu_addr
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
drivers/remoteproc/mtk_scp.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 577cbd5d421e..99d5a4de3e2f 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -298,7 +298,7 @@ static int mt8183_scp_before_load(struct mtk_scp *scp)
return 0;
}
-static void mt8192_power_on_sram(void *addr)
+static void mt8192_power_on_sram(void __iomem *addr)
{
int i;
@@ -307,7 +307,7 @@ static void mt8192_power_on_sram(void *addr)
writel(0, addr);
}
-static void mt8192_power_off_sram(void *addr)
+static void mt8192_power_off_sram(void __iomem *addr)
{
int i;
@@ -556,8 +556,9 @@ static int scp_map_memory_region(struct mtk_scp *scp)
/* Reserved SCP code size */
scp->dram_size = MAX_CODE_SIZE;
- scp->cpu_addr = dma_alloc_coherent(scp->dev, scp->dram_size,
- &scp->dma_addr, GFP_KERNEL);
+ scp->cpu_addr = (void __iomem *)dma_alloc_coherent(
+ scp->dev, scp->dram_size,
+ &scp->dma_addr, GFP_KERNEL);
if (!scp->cpu_addr)
return -ENOMEM;
@@ -569,8 +570,8 @@ static void scp_unmap_memory_region(struct mtk_scp *scp)
if (scp->dram_size == 0)
return;
- dma_free_coherent(scp->dev, scp->dram_size, scp->cpu_addr,
- scp->dma_addr);
+ dma_free_coherent(scp->dev, scp->dram_size,
+ (void __force *)scp->cpu_addr, scp->dma_addr);
of_reserved_mem_device_release(scp->dev);
}
--
2.29.2.299.gdc1121823c-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-11-16 4:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 4:41 Tzung-Bi Shih [this message]
2020-11-16 5:37 ` [PATCH] remoteproc/mediatek: fix sparse errors Nicolas Boichat
2020-11-16 6:57 ` Tzung-Bi Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201116044121.2457272-1-tzungbi@google.com \
--to=tzungbi@google.com \
--cc=bjorn.andersson@linaro.org \
--cc=drinkcat@google.com \
--cc=groeck@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=ohad@wizery.com \
--cc=pihsun@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox