* [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
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
0 siblings, 2 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2020-11-16 8:25 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: drinkcat, tzungbi, linux-remoteproc, groeck, linux-mediatek,
pihsun, matthias.bgg, linux-arm-kernel
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ 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
1 sibling, 2 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2020-11-16 8:25 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: drinkcat, kernel test robot, tzungbi, linux-remoteproc, groeck,
linux-mediatek, pihsun, matthias.bgg, linux-arm-kernel
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ 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; 7+ messages in thread
From: Nicolas Boichat @ 2020-11-16 8:42 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Ohad Ben-Cohen, kernel test robot,
open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM,
Bjorn Andersson, Guenter Roeck,
moderated list:ARM/Mediatek SoC support, Pi-Hsun Shih,
Matthias Brugger, linux-arm Mailing List
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ 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; 7+ messages in thread
From: Mathieu Poirier @ 2020-11-16 20:25 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, drinkcat, kernel test robot, linux-remoteproc,
bjorn.andersson, groeck, linux-mediatek, pihsun, matthias.bgg,
linux-arm-kernel
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ 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
1 sibling, 2 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2020-11-16 8:25 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: drinkcat, kernel test robot, tzungbi, linux-remoteproc, groeck,
linux-mediatek, pihsun, matthias.bgg, linux-arm-kernel
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ 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; 7+ messages in thread
From: Nicolas Boichat @ 2020-11-16 8:45 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Ohad Ben-Cohen, kernel test robot,
open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM,
Bjorn Andersson, Guenter Roeck,
moderated list:ARM/Mediatek SoC support, Pi-Hsun Shih,
Matthias Brugger, linux-arm Mailing List
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ 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; 7+ messages in thread
From: Mathieu Poirier @ 2020-11-16 20:32 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, drinkcat, kernel test robot, linux-remoteproc,
bjorn.andersson, groeck, linux-mediatek, pihsun, matthias.bgg,
linux-arm-kernel
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-16 20:34 UTC | newest]
Thread overview: 7+ 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).