mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Georgi Djakov <djakov@kernel.org>,
	Dmitry Baryshkov <lumag@kernel.org>
Subject: drivers/interconnect/qcom/icc-rpmh.c:176:28: sparse: sparse: incorrect type in assignment (different base types)
Date: Tue, 22 Sep 2026 14:44:30 +0800	[thread overview]
Message-ID: <202609221350.3Y8MOce9-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
commit: c96fc14322cee45cdf751cb4ae62c9eab25bc643 interconnect: qcom: add COMPILE_TEST
date:   9 weeks ago
config: openrisc-randconfig-r1309-20260922 (https://download.01.org/0day-ci/archive/20260922/202609221350.3Y8MOce9-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 16.1.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260922/202609221350.3Y8MOce9-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: c96fc14322ce ("interconnect: qcom: add COMPILE_TEST")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609221350.3Y8MOce9-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/interconnect/qcom/icc-rpmh.c:176:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] unit @@     got unsigned int [usertype] @@
   drivers/interconnect/qcom/icc-rpmh.c:176:28: sparse:     expected restricted __le32 [usertype] unit
   drivers/interconnect/qcom/icc-rpmh.c:176:28: sparse:     got unsigned int [usertype]
>> drivers/interconnect/qcom/icc-rpmh.c:177:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] width @@     got unsigned short [usertype] @@
   drivers/interconnect/qcom/icc-rpmh.c:177:29: sparse:     expected restricted __le16 [usertype] width
   drivers/interconnect/qcom/icc-rpmh.c:177:29: sparse:     got unsigned short [usertype]
--
>> drivers/interconnect/qcom/bcm-voter.c:102:77: sparse: sparse: restricted __le16 degrades to integer
   drivers/interconnect/qcom/bcm-voter.c:106:78: sparse: sparse: restricted __le16 degrades to integer
   drivers/interconnect/qcom/bcm-voter.c:112:66: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] base @@     got restricted __le32 [usertype] unit @@
   drivers/interconnect/qcom/bcm-voter.c:112:66: sparse:     expected unsigned int [usertype] base
   drivers/interconnect/qcom/bcm-voter.c:112:66: sparse:     got restricted __le32 [usertype] unit
   drivers/interconnect/qcom/bcm-voter.c:115:66: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] base @@     got restricted __le32 [usertype] unit @@
   drivers/interconnect/qcom/bcm-voter.c:115:66: sparse:     expected unsigned int [usertype] base
   drivers/interconnect/qcom/bcm-voter.c:115:66: sparse:     got restricted __le32 [usertype] unit

vim +176 drivers/interconnect/qcom/icc-rpmh.c

976daac4a1c581 David Dai   2020-02-28  138  
976daac4a1c581 David Dai   2020-02-28  139  /**
976daac4a1c581 David Dai   2020-02-28  140   * qcom_icc_bcm_init - populates bcm aux data and connect qnodes
976daac4a1c581 David Dai   2020-02-28  141   * @bcm: bcm to be initialized
976daac4a1c581 David Dai   2020-02-28  142   * @dev: associated provider device
976daac4a1c581 David Dai   2020-02-28  143   *
976daac4a1c581 David Dai   2020-02-28  144   * Return: 0 on success, or an error code otherwise
976daac4a1c581 David Dai   2020-02-28  145   */
976daac4a1c581 David Dai   2020-02-28  146  int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev)
976daac4a1c581 David Dai   2020-02-28  147  {
976daac4a1c581 David Dai   2020-02-28  148  	struct qcom_icc_node *qn;
976daac4a1c581 David Dai   2020-02-28  149  	const struct bcm_db *data;
976daac4a1c581 David Dai   2020-02-28  150  	size_t data_count;
976daac4a1c581 David Dai   2020-02-28  151  	int i;
976daac4a1c581 David Dai   2020-02-28  152  
976daac4a1c581 David Dai   2020-02-28  153  	/* BCM is already initialised*/
976daac4a1c581 David Dai   2020-02-28  154  	if (bcm->addr)
976daac4a1c581 David Dai   2020-02-28  155  		return 0;
976daac4a1c581 David Dai   2020-02-28  156  
976daac4a1c581 David Dai   2020-02-28  157  	bcm->addr = cmd_db_read_addr(bcm->name);
976daac4a1c581 David Dai   2020-02-28  158  	if (!bcm->addr) {
976daac4a1c581 David Dai   2020-02-28  159  		dev_err(dev, "%s could not find RPMh address\n",
976daac4a1c581 David Dai   2020-02-28  160  			bcm->name);
976daac4a1c581 David Dai   2020-02-28  161  		return -EINVAL;
976daac4a1c581 David Dai   2020-02-28  162  	}
976daac4a1c581 David Dai   2020-02-28  163  
976daac4a1c581 David Dai   2020-02-28  164  	data = cmd_db_read_aux_data(bcm->name, &data_count);
976daac4a1c581 David Dai   2020-02-28  165  	if (IS_ERR(data)) {
976daac4a1c581 David Dai   2020-02-28  166  		dev_err(dev, "%s command db read error (%ld)\n",
976daac4a1c581 David Dai   2020-02-28  167  			bcm->name, PTR_ERR(data));
976daac4a1c581 David Dai   2020-02-28  168  		return PTR_ERR(data);
976daac4a1c581 David Dai   2020-02-28  169  	}
976daac4a1c581 David Dai   2020-02-28  170  	if (!data_count) {
976daac4a1c581 David Dai   2020-02-28  171  		dev_err(dev, "%s command db missing or partial aux data\n",
976daac4a1c581 David Dai   2020-02-28  172  			bcm->name);
976daac4a1c581 David Dai   2020-02-28  173  		return -EINVAL;
976daac4a1c581 David Dai   2020-02-28  174  	}
976daac4a1c581 David Dai   2020-02-28  175  
976daac4a1c581 David Dai   2020-02-28 @176  	bcm->aux_data.unit = le32_to_cpu(data->unit);
976daac4a1c581 David Dai   2020-02-28 @177  	bcm->aux_data.width = le16_to_cpu(data->width);
976daac4a1c581 David Dai   2020-02-28  178  	bcm->aux_data.vcd = data->vcd;
976daac4a1c581 David Dai   2020-02-28  179  	bcm->aux_data.reserved = data->reserved;
976daac4a1c581 David Dai   2020-02-28  180  	INIT_LIST_HEAD(&bcm->list);
976daac4a1c581 David Dai   2020-02-28  181  	INIT_LIST_HEAD(&bcm->ws_list);
976daac4a1c581 David Dai   2020-02-28  182  
cb30e0292db258 Mike Tipton 2020-09-03  183  	if (!bcm->vote_scale)
cb30e0292db258 Mike Tipton 2020-09-03  184  		bcm->vote_scale = 1000;
cb30e0292db258 Mike Tipton 2020-09-03  185  
976daac4a1c581 David Dai   2020-02-28  186  	/* Link Qnodes to their respective BCMs */
976daac4a1c581 David Dai   2020-02-28  187  	for (i = 0; i < bcm->num_nodes; i++) {
976daac4a1c581 David Dai   2020-02-28  188  		qn = bcm->nodes[i];
976daac4a1c581 David Dai   2020-02-28  189  		qn->bcms[qn->num_bcms] = bcm;
976daac4a1c581 David Dai   2020-02-28  190  		qn->num_bcms++;
976daac4a1c581 David Dai   2020-02-28  191  	}
976daac4a1c581 David Dai   2020-02-28  192  
976daac4a1c581 David Dai   2020-02-28  193  	return 0;
976daac4a1c581 David Dai   2020-02-28  194  }
976daac4a1c581 David Dai   2020-02-28  195  EXPORT_SYMBOL_GPL(qcom_icc_bcm_init);
976daac4a1c581 David Dai   2020-02-28  196  

:::::: The code at line 176 was first introduced by commit
:::::: 976daac4a1c581e5d5fd64047519fd6fcde39738 interconnect: qcom: Consolidate interconnect RPMh support

:::::: TO: David Dai <daidavid1@codeaurora.org>
:::::: CC: Georgi Djakov <georgi.djakov@linaro.org>

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

                 reply	other threads:[~2026-09-22  6:44 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=202609221350.3Y8MOce9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=djakov@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rosenp@gmail.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

all inboxes | Powered by JetHome®