[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202303190635.gFHJrZo4-lkp@intel.com>
Date: Sun, 19 Mar 2023 06:42:47 +0800
From: kernel test robot <lkp@...el.com>
To: Guo Ren <guoren@...ux.alibaba.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/rpmsg/qcom_glink_smem.c:93:17: sparse: sparse: incorrect
type in argument 2 (different address spaces)
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@...el.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@...eaurora.org>
:::::: CC: Bjorn Andersson <bjorn.andersson@...aro.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists