[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008140924.6gE9FYUA%lkp@intel.com>
Date: Fri, 14 Aug 2020 09:33:28 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/rpmsg/qcom_glink_smem.c:93:48: 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: dddcbc139e96bd18d8c65ef7b7e440f0d32457c2
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: m68k-randconfig-s032-20200814 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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.2-168-g9554805c-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/rpmsg/qcom_glink_smem.c:93:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *src @@ got void * @@
>> drivers/rpmsg/qcom_glink_smem.c:93:48: sparse: expected void const volatile [noderef] __iomem *src
drivers/rpmsg/qcom_glink_smem.c:93:48: sparse: got void *
>> drivers/rpmsg/qcom_glink_smem.c:96:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *src @@ got void *fifo @@
drivers/rpmsg/qcom_glink_smem.c:96:47: sparse: expected void const volatile [noderef] __iomem *src
drivers/rpmsg/qcom_glink_smem.c:96:47: sparse: got void *fifo
--
drivers/ide/ide-io-std.c:185:25: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/ide/ide-io-std.c:185:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned int volatile [noderef] [usertype] __iomem *port @@ got unsigned int [usertype] * @@
>> drivers/ide/ide-io-std.c:185:25: sparse: expected unsigned int volatile [noderef] [usertype] __iomem *port
drivers/ide/ide-io-std.c:185:25: sparse: got unsigned int [usertype] *
drivers/ide/ide-io-std.c:200:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/ide/ide-io-std.c:200:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
>> drivers/ide/ide-io-std.c:200:17: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/ide-io-std.c:200:17: sparse: got unsigned short [usertype] *
drivers/ide/ide-io-std.c:229:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/ide/ide-io-std.c:229:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned int volatile [noderef] [usertype] __iomem *port @@ got unsigned int [usertype] * @@
drivers/ide/ide-io-std.c:229:25: sparse: expected unsigned int volatile [noderef] [usertype] __iomem *port
drivers/ide/ide-io-std.c:229:25: sparse: got unsigned int [usertype] *
drivers/ide/ide-io-std.c:244:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/ide/ide-io-std.c:244:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/ide-io-std.c:244:17: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/ide-io-std.c:244:17: sparse: got unsigned short [usertype] *
--
>> drivers/ide/q40ide.c:79:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
>> drivers/ide/q40ide.c:79:17: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/q40ide.c:79:17: sparse: got unsigned short [usertype] *
drivers/ide/q40ide.c:83:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/q40ide.c:83:25: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/q40ide.c:83:25: sparse: got unsigned short [usertype] *
drivers/ide/q40ide.c:92:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/q40ide.c:92:17: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/q40ide.c:92:17: sparse: got unsigned short [usertype] *
drivers/ide/q40ide.c:96:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short volatile [noderef] [usertype] __iomem *port @@ got unsigned short [usertype] * @@
drivers/ide/q40ide.c:96:26: sparse: expected unsigned short volatile [noderef] [usertype] __iomem *port
drivers/ide/q40ide.c:96:26: sparse: got unsigned short [usertype] *
vim +93 drivers/rpmsg/qcom_glink_smem.c
caf989c350e8e0b Bjorn Andersson 2017-08-24 78
caf989c350e8e0b Bjorn Andersson 2017-08-24 79 static void glink_smem_rx_peak(struct qcom_glink_pipe *np,
b88eee975a26b15 Bjorn Andersson 2017-08-24 80 void *data, unsigned int offset, size_t count)
caf989c350e8e0b Bjorn Andersson 2017-08-24 81 {
caf989c350e8e0b Bjorn Andersson 2017-08-24 82 struct glink_smem_pipe *pipe = to_smem_pipe(np);
caf989c350e8e0b Bjorn Andersson 2017-08-24 83 size_t len;
caf989c350e8e0b Bjorn Andersson 2017-08-24 84 u32 tail;
caf989c350e8e0b Bjorn Andersson 2017-08-24 85
caf989c350e8e0b Bjorn Andersson 2017-08-24 86 tail = le32_to_cpu(*pipe->tail);
b88eee975a26b15 Bjorn Andersson 2017-08-24 87 tail += offset;
b88eee975a26b15 Bjorn Andersson 2017-08-24 88 if (tail >= pipe->native.length)
b88eee975a26b15 Bjorn Andersson 2017-08-24 89 tail -= pipe->native.length;
caf989c350e8e0b Bjorn Andersson 2017-08-24 90
caf989c350e8e0b Bjorn Andersson 2017-08-24 91 len = min_t(size_t, count, pipe->native.length - tail);
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03 92 if (len)
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03 @93 memcpy_fromio(data, pipe->fifo + tail, len);
caf989c350e8e0b Bjorn Andersson 2017-08-24 94
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03 95 if (len != count)
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03 @96 memcpy_fromio(data + len, pipe->fifo, (count - len));
caf989c350e8e0b Bjorn Andersson 2017-08-24 97 }
caf989c350e8e0b 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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32685 bytes)
Powered by blists - more mailing lists