The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tiwei Bie <tiwei.btw@antgroup.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>
Subject: drivers/rpmsg/qcom_glink_smem.c:108:48: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Sat, 23 May 2026 22:19:57 +0800	[thread overview]
Message-ID: <202605232211.rTPARBaB-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-05-23 14:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202605232211.rTPARBaB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tiwei.btw@antgroup.com \
    /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