linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/rpmsg/qcom_glink_smem.c:108:48: sparse: sparse: incorrect type in argument 2 (different address spaces)
@ 2026-05-23 14:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-23 14:19 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: oe-kbuild-all, linux-kernel, Johannes Berg

Hi Tiwei,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   79bd2dded182b1d458b18e62684b7f82ffc682e5
commit: a0e2cb6a90634f3dc80f16e882a683ee5761b0b0 um: Add VFIO-based virtual PCI driver
date:   1 year, 1 month ago
config: um-randconfig-r132-20260523 (https://download.01.org/0day-ci/archive/20260523/202605232211.rTPARBaB-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260523/202605232211.rTPARBaB-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: a0e2cb6a9063 ("um: Add VFIO-based virtual PCI driver")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605232211.rTPARBaB-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/rpmsg/qcom_glink_smem.c:108:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void * @@
   drivers/rpmsg/qcom_glink_smem.c:108:48: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/rpmsg/qcom_glink_smem.c:108:48: sparse:     got void *
>> drivers/rpmsg/qcom_glink_smem.c:111:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void *fifo @@
   drivers/rpmsg/qcom_glink_smem.c:111:47: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/rpmsg/qcom_glink_smem.c:111:47: sparse:     got void *fifo

vim +108 drivers/rpmsg/qcom_glink_smem.c

caf989c350e8e0b Bjorn Andersson        2017-08-24   93  
a8f500c68673d38 Bjorn Andersson        2023-02-14   94  static void glink_smem_rx_peek(struct qcom_glink_pipe *np,
b88eee975a26b15 Bjorn Andersson        2017-08-24   95  			       void *data, unsigned int offset, size_t count)
caf989c350e8e0b Bjorn Andersson        2017-08-24   96  {
caf989c350e8e0b Bjorn Andersson        2017-08-24   97  	struct glink_smem_pipe *pipe = to_smem_pipe(np);
caf989c350e8e0b Bjorn Andersson        2017-08-24   98  	size_t len;
caf989c350e8e0b Bjorn Andersson        2017-08-24   99  	u32 tail;
caf989c350e8e0b Bjorn Andersson        2017-08-24  100  
caf989c350e8e0b Bjorn Andersson        2017-08-24  101  	tail = le32_to_cpu(*pipe->tail);
b88eee975a26b15 Bjorn Andersson        2017-08-24  102  	tail += offset;
b88eee975a26b15 Bjorn Andersson        2017-08-24  103  	if (tail >= pipe->native.length)
b88eee975a26b15 Bjorn Andersson        2017-08-24  104  		tail -= pipe->native.length;
caf989c350e8e0b Bjorn Andersson        2017-08-24  105  
caf989c350e8e0b Bjorn Andersson        2017-08-24  106  	len = min_t(size_t, count, pipe->native.length - tail);
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03  107  	if (len)
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03 @108  		memcpy_fromio(data, pipe->fifo + tail, len);
caf989c350e8e0b Bjorn Andersson        2017-08-24  109  
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03  110  	if (len != count)
928002a5e9dab2d Arun Kumar Neelakantam 2018-10-03 @111  		memcpy_fromio(data + len, pipe->fifo, (count - len));
caf989c350e8e0b Bjorn Andersson        2017-08-24  112  }
caf989c350e8e0b Bjorn Andersson        2017-08-24  113  

:::::: The code at line 108 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/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-23 14:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-23 14:19 drivers/rpmsg/qcom_glink_smem.c:108:48: sparse: sparse: incorrect type in argument 2 (different address spaces) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).