* [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors
@ 2020-11-16 8:25 Tzung-Bi Shih
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tzung-Bi Shih @ 2020-11-16 8:25 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: linux-remoteproc, matthias.bgg, linux-mediatek, linux-arm-kernel,
groeck, drinkcat, pihsun, tzungbi
Changes from v1:
(https://patchwork.kernel.org/project/linux-arm-kernel/patch/20201116044121.2457272-1-tzungbi@google.com/)
- separate into 2 patches
- provide the line numbers in commit messages
The series bases on https://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git/log/?h=for-next
Tzung-Bi Shih (2):
remoteproc/mediatek: fix sparse errors on sram power on and off
remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free
drivers/remoteproc/mtk_common.h | 2 +-
drivers/remoteproc/mtk_scp.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.29.2.299.gdc1121823c-goog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off
2020-11-16 8:25 [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors Tzung-Bi Shih
@ 2020-11-16 8:25 ` Tzung-Bi Shih
2020-11-16 8:42 ` Nicolas Boichat
2020-11-16 20:25 ` Mathieu Poirier
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
2020-11-24 4:20 ` [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors patchwork-bot+linux-remoteproc
2 siblings, 2 replies; 8+ messages in thread
From: Tzung-Bi Shih @ 2020-11-16 8:25 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: linux-remoteproc, matthias.bgg, linux-mediatek, linux-arm-kernel,
groeck, drinkcat, pihsun, tzungbi, kernel test robot
Fixes the following sparse errors on sram power on and off:
On drivers/remoteproc/mtk_scp.c:306:17:
warning: incorrect type in argument 2 (different address spaces)
expected void volatile [noderef] __iomem *addr
got void *addr
On drivers/remoteproc/mtk_scp.c:307:9:
warning: incorrect type in argument 2 (different address spaces)
expected void volatile [noderef] __iomem *addr
got void *addr
On drivers/remoteproc/mtk_scp.c:314:9:
warning: incorrect type in argument 2 (different address spaces)
expected void volatile [noderef] __iomem *addr
got void *addr
On drivers/remoteproc/mtk_scp.c:316:17:
warning: incorrect type in argument 2 (different address spaces)
expected void volatile [noderef] __iomem *addr
got void *addr
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
drivers/remoteproc/mtk_scp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 577cbd5d421e..8ed89ea1eb78 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;
--
2.29.2.299.gdc1121823c-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free
2020-11-16 8:25 [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors Tzung-Bi Shih
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
@ 2020-11-16 8:25 ` Tzung-Bi Shih
2020-11-16 8:45 ` Nicolas Boichat
2020-11-16 20:32 ` Mathieu Poirier
2020-11-24 4:20 ` [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors patchwork-bot+linux-remoteproc
2 siblings, 2 replies; 8+ messages in thread
From: Tzung-Bi Shih @ 2020-11-16 8:25 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: linux-remoteproc, matthias.bgg, linux-mediatek, linux-arm-kernel,
groeck, drinkcat, pihsun, tzungbi, kernel test robot
Fixes the following sparse errors on dma_alloc_coherent() and
dma_free_coherent().
On drivers/remoteproc/mtk_scp.c:559:23:
warning: incorrect type in assignment (different address spaces)
expected void [noderef] __iomem *cpu_addr
got void *
On drivers/remoteproc/mtk_scp.c:572:56:
warning: incorrect type in argument 3 (different address spaces)
expected void *cpu_addr
got void [noderef] __iomem *cpu_addr
The cpu_addr is not a __iomem address. Removes the marker.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
drivers/remoteproc/mtk_common.h | 2 +-
drivers/remoteproc/mtk_scp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
index 47b4561443a9..b3397d327786 100644
--- a/drivers/remoteproc/mtk_common.h
+++ b/drivers/remoteproc/mtk_common.h
@@ -99,7 +99,7 @@ struct mtk_scp {
bool ipi_id_ack[SCP_IPI_MAX];
wait_queue_head_t ack_wq;
- void __iomem *cpu_addr;
+ void *cpu_addr;
dma_addr_t dma_addr;
size_t dram_size;
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 8ed89ea1eb78..a1e23b5f19b9 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
} else if (scp->dram_size) {
offset = da - scp->dma_addr;
if (offset >= 0 && (offset + len) < scp->dram_size)
- return (void __force *)scp->cpu_addr + offset;
+ return scp->cpu_addr + offset;
}
return NULL;
--
2.29.2.299.gdc1121823c-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
@ 2020-11-16 8:42 ` Nicolas Boichat
2020-11-16 20:25 ` Mathieu Poirier
1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Boichat @ 2020-11-16 8:42 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Ohad Ben-Cohen, Bjorn Andersson,
open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM,
Matthias Brugger, moderated list:ARM/Mediatek SoC support,
linux-arm Mailing List, Guenter Roeck, Pi-Hsun Shih,
kernel test robot
On Mon, Nov 16, 2020 at 4:26 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
>
> Fixes the following sparse errors on sram power on and off:
>
> On drivers/remoteproc/mtk_scp.c:306:17:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> On drivers/remoteproc/mtk_scp.c:307:9:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> On drivers/remoteproc/mtk_scp.c:314:9:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> On drivers/remoteproc/mtk_scp.c:316:17:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> drivers/remoteproc/mtk_scp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index 577cbd5d421e..8ed89ea1eb78 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;
>
> --
> 2.29.2.299.gdc1121823c-goog
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
@ 2020-11-16 8:45 ` Nicolas Boichat
2020-11-16 20:32 ` Mathieu Poirier
1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Boichat @ 2020-11-16 8:45 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Ohad Ben-Cohen, Bjorn Andersson,
open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM,
Matthias Brugger, moderated list:ARM/Mediatek SoC support,
linux-arm Mailing List, Guenter Roeck, Pi-Hsun Shih,
kernel test robot
On Mon, Nov 16, 2020 at 4:26 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
>
> Fixes the following sparse errors on dma_alloc_coherent() and
> dma_free_coherent().
>
> On drivers/remoteproc/mtk_scp.c:559:23:
> warning: incorrect type in assignment (different address spaces)
> expected void [noderef] __iomem *cpu_addr
> got void *
>
> On drivers/remoteproc/mtk_scp.c:572:56:
> warning: incorrect type in argument 3 (different address spaces)
> expected void *cpu_addr
> got void [noderef] __iomem *cpu_addr
>
> The cpu_addr is not a __iomem address. Removes the marker.
>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> drivers/remoteproc/mtk_common.h | 2 +-
> drivers/remoteproc/mtk_scp.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
> index 47b4561443a9..b3397d327786 100644
> --- a/drivers/remoteproc/mtk_common.h
> +++ b/drivers/remoteproc/mtk_common.h
> @@ -99,7 +99,7 @@ struct mtk_scp {
> bool ipi_id_ack[SCP_IPI_MAX];
> wait_queue_head_t ack_wq;
>
> - void __iomem *cpu_addr;
> + void *cpu_addr;
> dma_addr_t dma_addr;
> size_t dram_size;
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index 8ed89ea1eb78..a1e23b5f19b9 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
> } else if (scp->dram_size) {
> offset = da - scp->dma_addr;
> if (offset >= 0 && (offset + len) < scp->dram_size)
> - return (void __force *)scp->cpu_addr + offset;
> + return scp->cpu_addr + offset;
> }
>
> return NULL;
> --
> 2.29.2.299.gdc1121823c-goog
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
2020-11-16 8:42 ` Nicolas Boichat
@ 2020-11-16 20:25 ` Mathieu Poirier
1 sibling, 0 replies; 8+ messages in thread
From: Mathieu Poirier @ 2020-11-16 20:25 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, bjorn.andersson, linux-remoteproc, matthias.bgg,
linux-mediatek, linux-arm-kernel, groeck, drinkcat, pihsun,
kernel test robot
On Mon, Nov 16, 2020 at 04:25:36PM +0800, Tzung-Bi Shih wrote:
> Fixes the following sparse errors on sram power on and off:
>
> On drivers/remoteproc/mtk_scp.c:306:17:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> On drivers/remoteproc/mtk_scp.c:307:9:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> On drivers/remoteproc/mtk_scp.c:314:9:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> On drivers/remoteproc/mtk_scp.c:316:17:
> warning: incorrect type in argument 2 (different address spaces)
> expected void volatile [noderef] __iomem *addr
> got void *addr
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> drivers/remoteproc/mtk_scp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index 577cbd5d421e..8ed89ea1eb78 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)
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> {
> int i;
>
> --
> 2.29.2.299.gdc1121823c-goog
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
2020-11-16 8:45 ` Nicolas Boichat
@ 2020-11-16 20:32 ` Mathieu Poirier
1 sibling, 0 replies; 8+ messages in thread
From: Mathieu Poirier @ 2020-11-16 20:32 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, bjorn.andersson, linux-remoteproc, matthias.bgg,
linux-mediatek, linux-arm-kernel, groeck, drinkcat, pihsun,
kernel test robot
On Mon, Nov 16, 2020 at 04:25:37PM +0800, Tzung-Bi Shih wrote:
> Fixes the following sparse errors on dma_alloc_coherent() and
> dma_free_coherent().
>
> On drivers/remoteproc/mtk_scp.c:559:23:
> warning: incorrect type in assignment (different address spaces)
> expected void [noderef] __iomem *cpu_addr
> got void *
>
> On drivers/remoteproc/mtk_scp.c:572:56:
> warning: incorrect type in argument 3 (different address spaces)
> expected void *cpu_addr
> got void [noderef] __iomem *cpu_addr
>
> The cpu_addr is not a __iomem address. Removes the marker.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> drivers/remoteproc/mtk_common.h | 2 +-
> drivers/remoteproc/mtk_scp.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
> index 47b4561443a9..b3397d327786 100644
> --- a/drivers/remoteproc/mtk_common.h
> +++ b/drivers/remoteproc/mtk_common.h
> @@ -99,7 +99,7 @@ struct mtk_scp {
> bool ipi_id_ack[SCP_IPI_MAX];
> wait_queue_head_t ack_wq;
>
> - void __iomem *cpu_addr;
> + void *cpu_addr;
> dma_addr_t dma_addr;
> size_t dram_size;
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index 8ed89ea1eb78..a1e23b5f19b9 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
> } else if (scp->dram_size) {
> offset = da - scp->dma_addr;
> if (offset >= 0 && (offset + len) < scp->dram_size)
> - return (void __force *)scp->cpu_addr + offset;
> + return scp->cpu_addr + offset;
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> }
>
> return NULL;
> --
> 2.29.2.299.gdc1121823c-goog
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors
2020-11-16 8:25 [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors Tzung-Bi Shih
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
@ 2020-11-24 4:20 ` patchwork-bot+linux-remoteproc
2 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+linux-remoteproc @ 2020-11-24 4:20 UTC (permalink / raw)
To: Tzung-Bi Shih; +Cc: linux-remoteproc
Hello:
This series was applied to andersson/remoteproc.git (refs/heads/for-next):
On Mon, 16 Nov 2020 16:25:35 +0800 you wrote:
> Changes from v1:
> (https://patchwork.kernel.org/project/linux-arm-kernel/patch/20201116044121.2457272-1-tzungbi@google.com/)
> - separate into 2 patches
> - provide the line numbers in commit messages
>
> The series bases on https://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git/log/?h=for-next
>
> [...]
Here is the summary with links:
- [v2,1/2] remoteproc/mediatek: fix sparse errors on sram power on and off
https://git.kernel.org/andersson/remoteproc/c/778f2664fa34
- [v2,2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free
https://git.kernel.org/andersson/remoteproc/c/903635cbc757
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-11-24 4:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 8:25 [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors Tzung-Bi Shih
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
2020-11-16 8:42 ` Nicolas Boichat
2020-11-16 20:25 ` Mathieu Poirier
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
2020-11-16 8:45 ` Nicolas Boichat
2020-11-16 20:32 ` Mathieu Poirier
2020-11-24 4:20 ` [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors patchwork-bot+linux-remoteproc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox