All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	arnaud.pouliquen@foss.st.com
Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	linux-remoteproc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH V2 4/6] remoteproc: imx_rproc: force pointer type
Date: Fri, 27 Jan 2023 17:22:44 +0800	[thread overview]
Message-ID: <20230127092246.1470865-5-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20230127092246.1470865-1-peng.fan@oss.nxp.com>

From: Peng Fan <peng.fan@nxp.com>

Address below sparse check warning:
imx_rproc.c:498:12: sparse: warning: incorrect type in assignment (different address spaces)
imx_rproc.c:498:12: sparse:    expected void *va
imx_rproc.c:498:12: sparse:    got void [noderef] __iomem *
imx_rproc.c:515:20: sparse: warning: incorrect type in argument 1 (different address spaces)
imx_rproc.c:515:20: sparse:    expected void volatile [noderef] __iomem *io_addr
imx_rproc.c:515:20: sparse:    got void *va
imx_rproc.c:631:17: sparse: warning: cast removes address space '__iomem' of expression

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/remoteproc/imx_rproc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 13199e593b47..295e0e0e869a 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -498,7 +498,7 @@ static int imx_rproc_mem_alloc(struct rproc *rproc,
 	void *va;
 
 	dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len);
-	va = ioremap_wc(mem->dma, mem->len);
+	va = (void __force *)ioremap_wc(mem->dma, mem->len);
 	if (IS_ERR_OR_NULL(va)) {
 		dev_err(dev, "Unable to map memory region: %p+%zx\n",
 			&mem->dma, mem->len);
@@ -515,7 +515,7 @@ static int imx_rproc_mem_release(struct rproc *rproc,
 				 struct rproc_mem_entry *mem)
 {
 	dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
-	iounmap(mem->va);
+	iounmap((void __iomem *)mem->va);
 
 	return 0;
 }
@@ -631,7 +631,7 @@ static struct resource_table *imx_rproc_get_loaded_rsc_table(struct rproc *rproc
 		return NULL;
 
 	*table_sz = SZ_1K;
-	return (struct resource_table *)priv->rsc_table;
+	return (struct resource_table __force *)priv->rsc_table;
 }
 
 static const struct rproc_ops imx_rproc_ops = {
-- 
2.37.1


WARNING: multiple messages have this Message-ID (diff)
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	arnaud.pouliquen@foss.st.com
Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	linux-remoteproc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH V2 4/6] remoteproc: imx_rproc: force pointer type
Date: Fri, 27 Jan 2023 17:22:44 +0800	[thread overview]
Message-ID: <20230127092246.1470865-5-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20230127092246.1470865-1-peng.fan@oss.nxp.com>

From: Peng Fan <peng.fan@nxp.com>

Address below sparse check warning:
imx_rproc.c:498:12: sparse: warning: incorrect type in assignment (different address spaces)
imx_rproc.c:498:12: sparse:    expected void *va
imx_rproc.c:498:12: sparse:    got void [noderef] __iomem *
imx_rproc.c:515:20: sparse: warning: incorrect type in argument 1 (different address spaces)
imx_rproc.c:515:20: sparse:    expected void volatile [noderef] __iomem *io_addr
imx_rproc.c:515:20: sparse:    got void *va
imx_rproc.c:631:17: sparse: warning: cast removes address space '__iomem' of expression

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/remoteproc/imx_rproc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 13199e593b47..295e0e0e869a 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -498,7 +498,7 @@ static int imx_rproc_mem_alloc(struct rproc *rproc,
 	void *va;
 
 	dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len);
-	va = ioremap_wc(mem->dma, mem->len);
+	va = (void __force *)ioremap_wc(mem->dma, mem->len);
 	if (IS_ERR_OR_NULL(va)) {
 		dev_err(dev, "Unable to map memory region: %p+%zx\n",
 			&mem->dma, mem->len);
@@ -515,7 +515,7 @@ static int imx_rproc_mem_release(struct rproc *rproc,
 				 struct rproc_mem_entry *mem)
 {
 	dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
-	iounmap(mem->va);
+	iounmap((void __iomem *)mem->va);
 
 	return 0;
 }
@@ -631,7 +631,7 @@ static struct resource_table *imx_rproc_get_loaded_rsc_table(struct rproc *rproc
 		return NULL;
 
 	*table_sz = SZ_1K;
-	return (struct resource_table *)priv->rsc_table;
+	return (struct resource_table __force *)priv->rsc_table;
 }
 
 static const struct rproc_ops imx_rproc_ops = {
-- 
2.37.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-01-27  9:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  9:22 [PATCH V2 0/6] remoteproc: imx_rproc: support firmware in DDR Peng Fan (OSS)
2023-01-27  9:22 ` Peng Fan (OSS)
2023-01-27  9:22 ` [PATCH V2 1/6] remoteproc: elf_loader: introduce rproc_elf_find_shdr Peng Fan (OSS)
2023-01-27  9:22   ` Peng Fan (OSS)
2023-01-27  9:22 ` [PATCH V2 2/6] remoteproc: imx_rproc: add devtype Peng Fan (OSS)
2023-01-27  9:22   ` Peng Fan (OSS)
2023-02-02 21:40   ` Mathieu Poirier
2023-02-02 21:40     ` Mathieu Poirier
2023-01-27  9:22 ` [PATCH V2 3/6] remoteproc: imx_rproc: correct i.MX8MQ DDR Code alias mapping Peng Fan (OSS)
2023-01-27  9:22   ` Peng Fan (OSS)
2023-01-27  9:22 ` Peng Fan (OSS) [this message]
2023-01-27  9:22   ` [PATCH V2 4/6] remoteproc: imx_rproc: force pointer type Peng Fan (OSS)
2023-01-27  9:22 ` [PATCH V2 5/6] remoteproc: imx_rproc: set Cortex-M stack/pc to TCML Peng Fan (OSS)
2023-01-27  9:22   ` Peng Fan (OSS)
2023-02-02 21:56   ` Mathieu Poirier
2023-02-02 21:56     ` Mathieu Poirier
2023-02-03  0:04     ` Peng Fan
2023-02-03  0:04       ` Peng Fan
2023-02-13 18:04       ` Mathieu Poirier
2023-02-13 18:04         ` Mathieu Poirier
2023-02-03 12:47   ` Daniel Baluta
2023-02-03 12:47     ` Daniel Baluta
2023-02-03 12:50     ` Peng Fan
2023-02-03 12:50       ` Peng Fan
2023-01-27  9:22 ` [PATCH V2 6/6] remoteproc: imx_rproc: set address of .interrupts section as bootaddr Peng Fan (OSS)
2023-01-27  9:22   ` Peng Fan (OSS)
2023-02-02 22:05   ` Mathieu Poirier
2023-02-02 22:05     ` Mathieu Poirier
2023-02-03  0:12     ` Peng Fan
2023-02-03  0:12       ` Peng Fan
2023-02-03 12:49 ` [PATCH V2 0/6] remoteproc: imx_rproc: support firmware in DDR Daniel Baluta
2023-02-03 12:49   ` Daniel Baluta
2023-02-03 12:55   ` Peng Fan
2023-02-03 12:55     ` Peng Fan
2023-02-03 13:03     ` Daniel Baluta
2023-02-03 13:03       ` Daniel Baluta

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=20230127092246.1470865-5-peng.fan@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=andersson@kernel.org \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.