All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Leo Yan <leo.yan@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Steev Klimaszewski <steev@kali.org>
Subject: [steev:linux-v5.19.0-rc8-tests 109/182] drivers/interconnect/qcom/icc-rpm.c:378:30: error: 'src_qn' undeclared
Date: Sun, 31 Jul 2022 18:55:44 +0800	[thread overview]
Message-ID: <202207311852.O8ROmInD-lkp@intel.com> (raw)

tree:   https://github.com/steev/linux linux-v5.19.0-rc8-tests
head:   171125613e081f0d0d9aeb710dc7469ce2c6a219
commit: 20386c070c2d12a74092d72aef1c8be37a5f5177 [109/182] interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values
config: arm-defconfig (https://download.01.org/0day-ci/archive/20220731/202207311852.O8ROmInD-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/steev/linux/commit/20386c070c2d12a74092d72aef1c8be37a5f5177
        git remote add steev https://github.com/steev/linux
        git fetch --no-tags steev linux-v5.19.0-rc8-tests
        git checkout 20386c070c2d12a74092d72aef1c8be37a5f5177
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/arm/include/asm/div64.h:107,
                    from include/linux/math.h:6,
                    from include/linux/kernel.h:25,
                    from include/linux/clk.h:13,
                    from drivers/interconnect/qcom/icc-rpm.c:6:
   drivers/interconnect/qcom/icc-rpm.c: In function 'qcom_icc_set':
>> drivers/interconnect/qcom/icc-rpm.c:378:30: error: 'src_qn' undeclared (first use in this function)
     378 |                 do_div(rate, src_qn->buswidth);
         |                              ^~~~~~
   include/asm-generic/div64.h:220:28: note: in definition of macro 'do_div'
     220 |         uint32_t __base = (base);                       \
         |                            ^~~~
   drivers/interconnect/qcom/icc-rpm.c:378:30: note: each undeclared identifier is reported only once for each function it appears in
     378 |                 do_div(rate, src_qn->buswidth);
         |                              ^~~~~~
   include/asm-generic/div64.h:220:28: note: in definition of macro 'do_div'
     220 |         uint32_t __base = (base);                       \
         |                            ^~~~
   drivers/interconnect/qcom/icc-rpm.c:335:13: warning: variable 'max_peak_bw' set but not used [-Wunused-but-set-variable]
     335 |         u64 max_peak_bw;
         |             ^~~~~~~~~~~


vim +/src_qn +378 drivers/interconnect/qcom/icc-rpm.c

   328	
   329	static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
   330	{
   331		struct qcom_icc_provider *qp;
   332		struct qcom_icc_node *qn;
   333		struct icc_provider *provider;
   334		u64 sum_bw;
   335		u64 max_peak_bw;
   336		u64 rate;
   337		u64 agg_avg[QCOM_ICC_NUM_BUCKETS], agg_peak[QCOM_ICC_NUM_BUCKETS];
   338		u64 max_agg_avg, max_agg_peak;
   339		int ret, i;
   340		int bucket;
   341	
   342		qn = src->data;
   343		provider = src->provider;
   344		qp = to_qcom_provider(provider);
   345	
   346		qcom_icc_bus_aggregate(provider, agg_avg, agg_peak, &max_agg_avg,
   347				       &max_agg_peak);
   348	
   349		sum_bw = icc_units_to_bps(max_agg_avg);
   350		max_peak_bw = icc_units_to_bps(max_agg_peak);
   351	
   352		if (!qn->qos.ap_owned) {
   353			/* send bandwidth request message to the RPM processor */
   354			ret = qcom_icc_rpm_set(qn->mas_rpm_id, qn->slv_rpm_id, sum_bw);
   355			if (ret)
   356				return ret;
   357		} else if (qn->qos.qos_mode != -1) {
   358			/* set bandwidth directly from the AP */
   359			ret = qcom_icc_qos_set(src, sum_bw);
   360			if (ret)
   361				return ret;
   362		}
   363	
   364		for (i = 0; i < qp->num_clks; i++) {
   365			/*
   366			* Use WAKE bucket for active clock, otherwise, use SLEEP bucket
   367			* for other clocks.  If a platform doesn't set interconnect
   368			* path tags, by default use sleep bucket for all clocks.
   369			*
   370			* Note, AMC bucket is not supported yet.
   371			*/
   372			if (!strcmp(qp->bus_clks[i].id, "bus_a"))
   373				bucket = QCOM_ICC_BUCKET_WAKE;
   374			else
   375				bucket = QCOM_ICC_BUCKET_SLEEP;
   376	
   377			rate = icc_units_to_bps(max(agg_avg[bucket], agg_peak[bucket]));
 > 378			do_div(rate, src_qn->buswidth);
   379			rate = min_t(u64, rate, LONG_MAX);
   380	
   381			if (qp->bus_clk_rate[i] == rate)
   382				continue;
   383	
   384			ret = clk_set_rate(qp->bus_clks[i].clk, rate);
   385			if (ret) {
   386				pr_err("%s clk_set_rate error: %d\n",
   387				       qp->bus_clks[i].id, ret);
   388				return ret;
   389			}
   390			qp->bus_clk_rate[i] = rate;
   391		}
   392	
   393		return 0;
   394	}
   395	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-07-31 10:56 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=202207311852.O8ROmInD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steev@kali.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.