Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Julien Massot <julien.massot@iot.bzh>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-remoteproc@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-kernel@vger.kernel.org, rmk+kernel@armlinux.org.uk,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] remoteproc: rcar_rproc: silince address space sparse warning
Date: Tue, 23 Aug 2022 13:26:18 -0600	[thread overview]
Message-ID: <20220823192618.GB1781852@p14s> (raw)
In-Reply-To: <20220808011610.188119-1-wangkefeng.wang@huawei.com>

On Mon, Aug 08, 2022 at 09:16:09AM +0800, Kefeng Wang wrote:
> Fix sparse warnings,
>    drivers/remoteproc/st_remoteproc.c:98:12: sparse: sparse: incorrect type in assignment (different address spaces) @@
> 	   expected void *va @@     got void [noderef] __iomem * @@
>    drivers/remoteproc/st_remoteproc.c:98:12: sparse:     expected void *va
>    drivers/remoteproc/st_remoteproc.c:98:12: sparse:     got void [noderef] __iomem *
>    ...
>    drivers/remoteproc/st_remoteproc.c:114:20: sparse:     expected void volatile [noderef] __iomem *io_addr
>    drivers/remoteproc/st_remoteproc.c:114:20: sparse:     got void *va
> 
> Add __iomem to io address space 'va' to fix it.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> note: the commit d803336abdbc "(ARM: mm: kill unused runtime hook arch_iounmap())"
> won't introduce the warning, but lkp report issue to me many times,
> let's fix it.
> 
>  drivers/remoteproc/rcar_rproc.c | 2 +-
>  include/linux/remoteproc.h      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

$ ./scripts/checkpatch.pl _PATCH_remoteproc_rcar_rproc_silince_address_space_sparse_warning.patch 
WARNING: A patch subject line should describe the change not the tool that found it
#9: 
Subject: [PATCH] remoteproc: rcar_rproc: silince address space sparse warning

total: 0 errors, 1 warnings, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

_PATCH_remoteproc_rcar_rproc_silince_address_space_sparse_warning.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


> diff --git a/drivers/remoteproc/rcar_rproc.c b/drivers/remoteproc/rcar_rproc.c
> index aa86154109c7..e3363a4cde0a 100644
> --- a/drivers/remoteproc/rcar_rproc.c
> +++ b/drivers/remoteproc/rcar_rproc.c
> @@ -22,7 +22,7 @@ static int rcar_rproc_mem_alloc(struct rproc *rproc,
>  				 struct rproc_mem_entry *mem)
>  {
>  	struct device *dev = &rproc->dev;
> -	void *va;
> +	void __iomem *va;
>  
>  	dev_dbg(dev, "map memory: %pa+%zx\n", &mem->dma, mem->len);
>  	va = ioremap_wc(mem->dma, mem->len);
> diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
> index 7c943f0a2fc4..c0c950cf7d72 100644
> --- a/include/linux/remoteproc.h
> +++ b/include/linux/remoteproc.h
> @@ -330,7 +330,7 @@ struct rproc;
>   * @alloc: specific memory allocator function
>   */
>  struct rproc_mem_entry {
> -	void *va;
> +	void __iomem *va;
>  	bool is_iomem;
>  	dma_addr_t dma;
>  	size_t len;
> -- 
> 2.35.3
> 

      parent reply	other threads:[~2022-08-23 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  1:16 [PATCH] remoteproc: rcar_rproc: silince address space sparse warning Kefeng Wang
2022-08-08  1:16 ` Kefeng Wang
2022-08-08  1:12   ` Kefeng Wang
2022-08-23 19:26 ` Mathieu Poirier [this message]

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=20220823192618.GB1781852@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=julien.massot@iot.bzh \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=wangkefeng.wang@huawei.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