mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Thomas Weißschuh " <thomas.weissschuh@linutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	David Gow <davidgow@google.com>
Subject: drivers/soc/qcom/smd-rpm.c:177:47: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Tue, 07 Apr 2026 11:49:04 +0800	[thread overview]
Message-ID: <202604032358.ZK1EJ1Sq-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d8a9a4b11a137909e306e50346148fc5c3b63f9d
commit: 031cdd3bc3f369553933c1b0f4cb18000162c8ff kunit: Enable PCI on UML without triggering WARN()
date:   7 months ago
config: um-randconfig-r122-20260403 (https://download.01.org/0day-ci/archive/20260403/202604032358.ZK1EJ1Sq-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e3cbd9984a78422c3799629eb6b5f7f7818c1a11)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260403/202604032358.ZK1EJ1Sq-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: 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604032358.ZK1EJ1Sq-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/soc/qcom/smd-rpm.c:177:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned char const * @@
   drivers/soc/qcom/smd-rpm.c:177:47: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/soc/qcom/smd-rpm.c:177:47: sparse:     got unsigned char const *

vim +177 drivers/soc/qcom/smd-rpm.c

936f14cf4e6716 Bjorn Andersson 2015-07-27  146  
5052de8deff561 Bjorn Andersson 2017-03-27  147  static int qcom_smd_rpm_callback(struct rpmsg_device *rpdev,
5052de8deff561 Bjorn Andersson 2017-03-27  148  				 void *data,
5052de8deff561 Bjorn Andersson 2017-03-27  149  				 int count,
5052de8deff561 Bjorn Andersson 2017-03-27  150  				 void *priv,
5052de8deff561 Bjorn Andersson 2017-03-27  151  				 u32 addr)
936f14cf4e6716 Bjorn Andersson 2015-07-27  152  {
936f14cf4e6716 Bjorn Andersson 2015-07-27  153  	const struct qcom_rpm_header *hdr = data;
30b7ea5eda0afb Stephen Boyd    2015-09-02  154  	size_t hdr_length = le32_to_cpu(hdr->length);
936f14cf4e6716 Bjorn Andersson 2015-07-27  155  	const struct qcom_rpm_message *msg;
5052de8deff561 Bjorn Andersson 2017-03-27  156  	struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev);
936f14cf4e6716 Bjorn Andersson 2015-07-27  157  	const u8 *buf = data + sizeof(struct qcom_rpm_header);
30b7ea5eda0afb Stephen Boyd    2015-09-02  158  	const u8 *end = buf + hdr_length;
936f14cf4e6716 Bjorn Andersson 2015-07-27  159  	char msgbuf[32];
936f14cf4e6716 Bjorn Andersson 2015-07-27  160  	int status = 0;
30b7ea5eda0afb Stephen Boyd    2015-09-02  161  	u32 len, msg_length;
936f14cf4e6716 Bjorn Andersson 2015-07-27  162  
30b7ea5eda0afb Stephen Boyd    2015-09-02  163  	if (le32_to_cpu(hdr->service_type) != RPM_SERVICE_TYPE_REQUEST ||
30b7ea5eda0afb Stephen Boyd    2015-09-02  164  	    hdr_length < sizeof(struct qcom_rpm_message)) {
b853cb9628bfbc Bjorn Andersson 2016-03-28  165  		dev_err(rpm->dev, "invalid request\n");
936f14cf4e6716 Bjorn Andersson 2015-07-27  166  		return 0;
936f14cf4e6716 Bjorn Andersson 2015-07-27  167  	}
936f14cf4e6716 Bjorn Andersson 2015-07-27  168  
936f14cf4e6716 Bjorn Andersson 2015-07-27  169  	while (buf < end) {
936f14cf4e6716 Bjorn Andersson 2015-07-27  170  		msg = (struct qcom_rpm_message *)buf;
30b7ea5eda0afb Stephen Boyd    2015-09-02  171  		msg_length = le32_to_cpu(msg->length);
30b7ea5eda0afb Stephen Boyd    2015-09-02  172  		switch (le32_to_cpu(msg->msg_type)) {
936f14cf4e6716 Bjorn Andersson 2015-07-27  173  		case RPM_MSG_TYPE_MSG_ID:
936f14cf4e6716 Bjorn Andersson 2015-07-27  174  			break;
936f14cf4e6716 Bjorn Andersson 2015-07-27  175  		case RPM_MSG_TYPE_ERR:
30b7ea5eda0afb Stephen Boyd    2015-09-02  176  			len = min_t(u32, ALIGN(msg_length, 4), sizeof(msgbuf));
936f14cf4e6716 Bjorn Andersson 2015-07-27 @177  			memcpy_fromio(msgbuf, msg->message, len);
936f14cf4e6716 Bjorn Andersson 2015-07-27  178  			msgbuf[len - 1] = 0;
936f14cf4e6716 Bjorn Andersson 2015-07-27  179  
936f14cf4e6716 Bjorn Andersson 2015-07-27  180  			if (!strcmp(msgbuf, "resource does not exist"))
936f14cf4e6716 Bjorn Andersson 2015-07-27  181  				status = -ENXIO;
936f14cf4e6716 Bjorn Andersson 2015-07-27  182  			else
936f14cf4e6716 Bjorn Andersson 2015-07-27  183  				status = -EINVAL;
936f14cf4e6716 Bjorn Andersson 2015-07-27  184  			break;
936f14cf4e6716 Bjorn Andersson 2015-07-27  185  		}
936f14cf4e6716 Bjorn Andersson 2015-07-27  186  
30b7ea5eda0afb Stephen Boyd    2015-09-02  187  		buf = PTR_ALIGN(buf + 2 * sizeof(u32) + msg_length, 4);
936f14cf4e6716 Bjorn Andersson 2015-07-27  188  	}
936f14cf4e6716 Bjorn Andersson 2015-07-27  189  
936f14cf4e6716 Bjorn Andersson 2015-07-27  190  	rpm->ack_status = status;
936f14cf4e6716 Bjorn Andersson 2015-07-27  191  	complete(&rpm->ack);
936f14cf4e6716 Bjorn Andersson 2015-07-27  192  	return 0;
936f14cf4e6716 Bjorn Andersson 2015-07-27  193  }
936f14cf4e6716 Bjorn Andersson 2015-07-27  194  

:::::: The code at line 177 was first introduced by commit
:::::: 936f14cf4e67168fcd37f10cebf5a475f490fb6e soc: qcom: Driver for the Qualcomm RPM over SMD

:::::: TO: Bjorn Andersson <bjorn.andersson@sonymobile.com>
:::::: CC: Andy Gross <agross@codeaurora.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-04-07  3:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  3:49 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-12  5:25 kernel test robot
2020-07-05  3:13 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=202604032358.ZK1EJ1Sq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davidgow@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=skhan@linuxfoundation.org \
    --cc=thomas.weissschuh@linutronix.de \
    /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

all inboxes | Powered by JetHome®