From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/remoteproc/imx_rproc.c:298:12: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Mon, 06 Dec 2021 01:48:26 +0800 [thread overview]
Message-ID: <202112060157.aVGv35QJ-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4757 bytes --]
Hi Peng,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 79a72162048e42a677bc7336a9f5d86fc3ff9558
commit: 2df7062002d0263bde70b453f671bb4f8493e169 remoteproc: imx_proc: enable virtio/mailbox
date: 9 months ago
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20211206/202112060157.aVGv35QJ-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2df7062002d0263bde70b453f671bb4f8493e169
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2df7062002d0263bde70b453f671bb4f8493e169
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/dma/ drivers/gpu/drm/tegra/ drivers/net/wireless/mediatek/mt76/mt7915/ drivers/remoteproc/ drivers/staging/ fs/proc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/remoteproc/imx_rproc.c:298:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@
drivers/remoteproc/imx_rproc.c:298:12: sparse: expected void *va
drivers/remoteproc/imx_rproc.c:298:12: sparse: got void [noderef] __iomem *
>> drivers/remoteproc/imx_rproc.c:315:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *va @@
drivers/remoteproc/imx_rproc.c:315:20: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/remoteproc/imx_rproc.c:315:20: sparse: got void *va
vim +298 drivers/remoteproc/imx_rproc.c
a0ff4aa6f01080 Oleksij Rempel 2017-08-17 290
b29b4249f8f0ca Peng Fan 2021-03-06 291 static int imx_rproc_mem_alloc(struct rproc *rproc,
b29b4249f8f0ca Peng Fan 2021-03-06 292 struct rproc_mem_entry *mem)
b29b4249f8f0ca Peng Fan 2021-03-06 293 {
b29b4249f8f0ca Peng Fan 2021-03-06 294 struct device *dev = rproc->dev.parent;
b29b4249f8f0ca Peng Fan 2021-03-06 295 void *va;
b29b4249f8f0ca Peng Fan 2021-03-06 296
b29b4249f8f0ca Peng Fan 2021-03-06 297 dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len);
b29b4249f8f0ca Peng Fan 2021-03-06 @298 va = ioremap_wc(mem->dma, mem->len);
b29b4249f8f0ca Peng Fan 2021-03-06 299 if (IS_ERR_OR_NULL(va)) {
b29b4249f8f0ca Peng Fan 2021-03-06 300 dev_err(dev, "Unable to map memory region: %p+%zx\n",
b29b4249f8f0ca Peng Fan 2021-03-06 301 &mem->dma, mem->len);
b29b4249f8f0ca Peng Fan 2021-03-06 302 return -ENOMEM;
b29b4249f8f0ca Peng Fan 2021-03-06 303 }
b29b4249f8f0ca Peng Fan 2021-03-06 304
b29b4249f8f0ca Peng Fan 2021-03-06 305 /* Update memory entry va */
b29b4249f8f0ca Peng Fan 2021-03-06 306 mem->va = va;
b29b4249f8f0ca Peng Fan 2021-03-06 307
b29b4249f8f0ca Peng Fan 2021-03-06 308 return 0;
b29b4249f8f0ca Peng Fan 2021-03-06 309 }
b29b4249f8f0ca Peng Fan 2021-03-06 310
b29b4249f8f0ca Peng Fan 2021-03-06 311 static int imx_rproc_mem_release(struct rproc *rproc,
b29b4249f8f0ca Peng Fan 2021-03-06 312 struct rproc_mem_entry *mem)
b29b4249f8f0ca Peng Fan 2021-03-06 313 {
b29b4249f8f0ca Peng Fan 2021-03-06 314 dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
b29b4249f8f0ca Peng Fan 2021-03-06 @315 iounmap(mem->va);
b29b4249f8f0ca Peng Fan 2021-03-06 316
b29b4249f8f0ca Peng Fan 2021-03-06 317 return 0;
b29b4249f8f0ca Peng Fan 2021-03-06 318 }
b29b4249f8f0ca Peng Fan 2021-03-06 319
:::::: The code at line 298 was first introduced by commit
:::::: b29b4249f8f0cad1a1787cbe59e638ff23d489ed remoteproc: imx_rproc: add i.MX specific parse fw hook
:::::: TO: Peng Fan <peng.fan@nxp.com>
:::::: CC: Bjorn Andersson <bjorn.andersson@linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Peng Fan <peng.fan@nxp.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Richard Zhu <hongxing.zhu@nxp.com>,
Mathieu Poirier <mathieu.poirer@linaro.org>
Subject: drivers/remoteproc/imx_rproc.c:298:12: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Mon, 6 Dec 2021 01:48:26 +0800 [thread overview]
Message-ID: <202112060157.aVGv35QJ-lkp@intel.com> (raw)
Hi Peng,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 79a72162048e42a677bc7336a9f5d86fc3ff9558
commit: 2df7062002d0263bde70b453f671bb4f8493e169 remoteproc: imx_proc: enable virtio/mailbox
date: 9 months ago
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20211206/202112060157.aVGv35QJ-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2df7062002d0263bde70b453f671bb4f8493e169
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2df7062002d0263bde70b453f671bb4f8493e169
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/dma/ drivers/gpu/drm/tegra/ drivers/net/wireless/mediatek/mt76/mt7915/ drivers/remoteproc/ drivers/staging/ fs/proc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/remoteproc/imx_rproc.c:298:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@
drivers/remoteproc/imx_rproc.c:298:12: sparse: expected void *va
drivers/remoteproc/imx_rproc.c:298:12: sparse: got void [noderef] __iomem *
>> drivers/remoteproc/imx_rproc.c:315:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *va @@
drivers/remoteproc/imx_rproc.c:315:20: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/remoteproc/imx_rproc.c:315:20: sparse: got void *va
vim +298 drivers/remoteproc/imx_rproc.c
a0ff4aa6f01080 Oleksij Rempel 2017-08-17 290
b29b4249f8f0ca Peng Fan 2021-03-06 291 static int imx_rproc_mem_alloc(struct rproc *rproc,
b29b4249f8f0ca Peng Fan 2021-03-06 292 struct rproc_mem_entry *mem)
b29b4249f8f0ca Peng Fan 2021-03-06 293 {
b29b4249f8f0ca Peng Fan 2021-03-06 294 struct device *dev = rproc->dev.parent;
b29b4249f8f0ca Peng Fan 2021-03-06 295 void *va;
b29b4249f8f0ca Peng Fan 2021-03-06 296
b29b4249f8f0ca Peng Fan 2021-03-06 297 dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len);
b29b4249f8f0ca Peng Fan 2021-03-06 @298 va = ioremap_wc(mem->dma, mem->len);
b29b4249f8f0ca Peng Fan 2021-03-06 299 if (IS_ERR_OR_NULL(va)) {
b29b4249f8f0ca Peng Fan 2021-03-06 300 dev_err(dev, "Unable to map memory region: %p+%zx\n",
b29b4249f8f0ca Peng Fan 2021-03-06 301 &mem->dma, mem->len);
b29b4249f8f0ca Peng Fan 2021-03-06 302 return -ENOMEM;
b29b4249f8f0ca Peng Fan 2021-03-06 303 }
b29b4249f8f0ca Peng Fan 2021-03-06 304
b29b4249f8f0ca Peng Fan 2021-03-06 305 /* Update memory entry va */
b29b4249f8f0ca Peng Fan 2021-03-06 306 mem->va = va;
b29b4249f8f0ca Peng Fan 2021-03-06 307
b29b4249f8f0ca Peng Fan 2021-03-06 308 return 0;
b29b4249f8f0ca Peng Fan 2021-03-06 309 }
b29b4249f8f0ca Peng Fan 2021-03-06 310
b29b4249f8f0ca Peng Fan 2021-03-06 311 static int imx_rproc_mem_release(struct rproc *rproc,
b29b4249f8f0ca Peng Fan 2021-03-06 312 struct rproc_mem_entry *mem)
b29b4249f8f0ca Peng Fan 2021-03-06 313 {
b29b4249f8f0ca Peng Fan 2021-03-06 314 dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
b29b4249f8f0ca Peng Fan 2021-03-06 @315 iounmap(mem->va);
b29b4249f8f0ca Peng Fan 2021-03-06 316
b29b4249f8f0ca Peng Fan 2021-03-06 317 return 0;
b29b4249f8f0ca Peng Fan 2021-03-06 318 }
b29b4249f8f0ca Peng Fan 2021-03-06 319
:::::: The code at line 298 was first introduced by commit
:::::: b29b4249f8f0cad1a1787cbe59e638ff23d489ed remoteproc: imx_rproc: add i.MX specific parse fw hook
:::::: TO: Peng Fan <peng.fan@nxp.com>
:::::: CC: Bjorn Andersson <bjorn.andersson@linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2021-12-05 17:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-05 17:48 kernel test robot [this message]
2021-12-05 17:48 ` drivers/remoteproc/imx_rproc.c:298:12: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-12-13 14:14 kernel test robot
2021-12-13 14:14 ` kernel test robot
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=202112060157.aVGv35QJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.