From: kernel test robot <lkp@intel.com>
To: Guo Ren <guoren@linux.alibaba.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/rpmsg/qcom_glink_smem.c:93:17: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Sun, 19 Mar 2023 06:42:47 +0800 [thread overview]
Message-ID: <202303190635.gFHJrZo4-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 534293368afa1a953c283310b82e4dc58309d51e
commit: 8318f7c231d5be09e47410c5ab387b9bef6fe19e csky: optimize memcpy_{from,to}io() and memset_io()
date: 11 months ago
config: csky-randconfig-s033-20230319 (https://download.01.org/0day-ci/archive/20230319/202303190635.gFHJrZo4-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8318f7c231d5be09e47410c5ab387b9bef6fe19e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8318f7c231d5be09e47410c5ab387b9bef6fe19e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash drivers/rpmsg/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303190635.gFHJrZo4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/rpmsg/qcom_glink_smem.c:93:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem * @@ got void * @@
drivers/rpmsg/qcom_glink_smem.c:93:17: sparse: expected void const volatile [noderef] __iomem *
drivers/rpmsg/qcom_glink_smem.c:93:17: sparse: got void *
>> drivers/rpmsg/qcom_glink_smem.c:96:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem * @@ got void *fifo @@
drivers/rpmsg/qcom_glink_smem.c:96:17: sparse: expected void const volatile [noderef] __iomem *
drivers/rpmsg/qcom_glink_smem.c:96:17: sparse: got void *fifo
vim +93 drivers/rpmsg/qcom_glink_smem.c
caf989c350e8e0 Bjorn Andersson 2017-08-24 78
caf989c350e8e0 Bjorn Andersson 2017-08-24 79 static void glink_smem_rx_peak(struct qcom_glink_pipe *np,
b88eee975a26b1 Bjorn Andersson 2017-08-24 80 void *data, unsigned int offset, size_t count)
caf989c350e8e0 Bjorn Andersson 2017-08-24 81 {
caf989c350e8e0 Bjorn Andersson 2017-08-24 82 struct glink_smem_pipe *pipe = to_smem_pipe(np);
caf989c350e8e0 Bjorn Andersson 2017-08-24 83 size_t len;
caf989c350e8e0 Bjorn Andersson 2017-08-24 84 u32 tail;
caf989c350e8e0 Bjorn Andersson 2017-08-24 85
caf989c350e8e0 Bjorn Andersson 2017-08-24 86 tail = le32_to_cpu(*pipe->tail);
b88eee975a26b1 Bjorn Andersson 2017-08-24 87 tail += offset;
b88eee975a26b1 Bjorn Andersson 2017-08-24 88 if (tail >= pipe->native.length)
b88eee975a26b1 Bjorn Andersson 2017-08-24 89 tail -= pipe->native.length;
caf989c350e8e0 Bjorn Andersson 2017-08-24 90
caf989c350e8e0 Bjorn Andersson 2017-08-24 91 len = min_t(size_t, count, pipe->native.length - tail);
928002a5e9dab2 Arun Kumar Neelakantam 2018-10-03 92 if (len)
928002a5e9dab2 Arun Kumar Neelakantam 2018-10-03 @93 memcpy_fromio(data, pipe->fifo + tail, len);
caf989c350e8e0 Bjorn Andersson 2017-08-24 94
928002a5e9dab2 Arun Kumar Neelakantam 2018-10-03 95 if (len != count)
928002a5e9dab2 Arun Kumar Neelakantam 2018-10-03 @96 memcpy_fromio(data + len, pipe->fifo, (count - len));
caf989c350e8e0 Bjorn Andersson 2017-08-24 97 }
caf989c350e8e0 Bjorn Andersson 2017-08-24 98
:::::: The code at line 93 was first introduced by commit
:::::: 928002a5e9dab2ddc1a0fe3e00739e89be30dc6b rpmsg: glink: smem: Support rx peak for size less than 4 bytes
:::::: TO: Arun Kumar Neelakantam <aneela@codeaurora.org>
:::::: CC: Bjorn Andersson <bjorn.andersson@linaro.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-03-18 22:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-18 22:42 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-13 23:13 drivers/rpmsg/qcom_glink_smem.c:93:17: sparse: sparse: incorrect type in argument 2 (different address spaces) 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=202303190635.gFHJrZo4-lkp@intel.com \
--to=lkp@intel.com \
--cc=guoren@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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