mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
	Georgi Djakov <djakov@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [PATCH v2] interconnect: qcom: implement get_bw with rpmh_read
Date: Wed, 9 Sep 2026 15:48:26 +0800	[thread overview]
Message-ID: <202609091547.IZVghFTg-lkp@intel.com> (raw)
In-Reply-To: <20260908-topic-sm8x50-icc-read-rpmh-v2-1-b6f1c4205450@linaro.org>

Hi Neil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cee9395acd8043be0644b25c34bfa86623f2b935]

url:    https://github.com/intel-lab-lkp/linux/commits/Neil-Armstrong/interconnect-qcom-implement-get_bw-with-rpmh_read/20260908-100915
base:   cee9395acd8043be0644b25c34bfa86623f2b935
patch link:    https://lore.kernel.org/r/20260908-topic-sm8x50-icc-read-rpmh-v2-1-b6f1c4205450%40linaro.org
patch subject: [PATCH v2] interconnect: qcom: implement get_bw with rpmh_read
config: arc-randconfig-r112-20260909 (https://download.01.org/0day-ci/archive/20260909/202609091547.IZVghFTg-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260909/202609091547.IZVghFTg-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609091547.IZVghFTg-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/interconnect/qcom/icc-rpmh.c:169:35: sparse: sparse: invalid assignment: *=
   drivers/interconnect/qcom/icc-rpmh.c:169:35: sparse:    left side has type unsigned long long
   drivers/interconnect/qcom/icc-rpmh.c:169:35: sparse:    right side has type restricted __le32
>> drivers/interconnect/qcom/icc-rpmh.c:172:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] __base @@     got restricted __le16 [usertype] width @@
   drivers/interconnect/qcom/icc-rpmh.c:172:33: sparse:     expected unsigned int [usertype] __base
   drivers/interconnect/qcom/icc-rpmh.c:172:33: sparse:     got restricted __le16 [usertype] width
   drivers/interconnect/qcom/icc-rpmh.c:178:35: sparse: sparse: invalid assignment: *=
   drivers/interconnect/qcom/icc-rpmh.c:178:35: sparse:    left side has type unsigned long long
   drivers/interconnect/qcom/icc-rpmh.c:178:35: sparse:    right side has type restricted __le32
   drivers/interconnect/qcom/icc-rpmh.c:181:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] __base @@     got restricted __le16 [usertype] width @@
   drivers/interconnect/qcom/icc-rpmh.c:181:33: sparse:     expected unsigned int [usertype] __base
   drivers/interconnect/qcom/icc-rpmh.c:181:33: sparse:     got restricted __le16 [usertype] width
   drivers/interconnect/qcom/icc-rpmh.c:231: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:231:28: sparse:     expected restricted __le32 [usertype] unit
   drivers/interconnect/qcom/icc-rpmh.c:231:28: sparse:     got unsigned int [usertype]
   drivers/interconnect/qcom/icc-rpmh.c:232: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:232:29: sparse:     expected restricted __le16 [usertype] width
   drivers/interconnect/qcom/icc-rpmh.c:232:29: sparse:     got unsigned short [usertype]

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

   138	
   139	static int qcom_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak)
   140	{
   141		struct qcom_icc_node *qn = node->data;
   142		u32 avg_max = 0;
   143		u32 peak_max = 0;
   144		u64 x, y;
   145		int i;
   146	
   147		if (!qn->num_bcms) {
   148			*avg = INT_MAX;
   149			*peak = INT_MAX;
   150	
   151			return 0;
   152		}
   153	
   154		for (i = 0; i < qn->num_bcms; ++i) {
   155			struct qcom_icc_bcm *bcm = qn->bcms[i];
   156	
   157			/* Use AMC vote for boot-up */
   158			x = bcm->vote_x[QCOM_ICC_BUCKET_AMC];
   159			y = bcm->vote_y[QCOM_ICC_BUCKET_AMC];
   160	
   161			/* Consider enable mask and convert to INT_MAX */
   162			if (bcm->enable_mask) {
   163				if (x & bcm->enable_mask)
   164					avg_max = INT_MAX;
   165				if (y & bcm->enable_mask)
   166					peak_max = INT_MAX;
   167			} else {
   168				if (x) {
 > 169					x *= bcm->aux_data.unit;
   170					do_div(x, bcm->vote_scale);
   171					x *= qn->buswidth * qn->channels;
 > 172					do_div(x, bcm->aux_data.width);
   173	
   174					avg_max = max(avg_max, x);
   175				}
   176	
   177				if (y) {
   178					y *= bcm->aux_data.unit;
   179					do_div(y, bcm->vote_scale);
   180					y *= qn->buswidth;
   181					do_div(y, bcm->aux_data.width);
   182	
   183					peak_max = max(peak_max, y);
   184				}
   185			}
   186		}
   187	
   188		*avg = avg_max;
   189		*peak = peak_max;
   190	
   191		return 0;
   192	}
   193	

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

      parent reply	other threads:[~2026-09-09  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  8:09 Neil Armstrong
2026-09-08 14:39 ` Maulik Shah
2026-09-09  7:16   ` Neil Armstrong
2026-09-09  7:48 ` kernel test robot [this message]

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=202609091547.IZVghFTg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=djakov@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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®