From: kernel test robot <lkp@intel.com>
To: Dzmitry Sankouski <dsankouski@gmail.com>,
Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dzmitry Sankouski <dsankouski@gmail.com>
Subject: Re: [PATCH v5 2/2] gcc-sdm845: Add general purpose clock ops
Date: Sun, 29 Sep 2024 07:44:33 +0800 [thread overview]
Message-ID: <202409290702.jlF0XWJZ-lkp@intel.com> (raw)
In-Reply-To: <20240617-starqltechn_integration_upstream-v5-2-761795ea5084@gmail.com>
Hi Dzmitry,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 92fc9636d1471b7f68bfee70c776f7f77e747b97]
url: https://github.com/intel-lab-lkp/linux/commits/Dzmitry-Sankouski/clk-qcom-clk-rcg2-document-calc_rate-function/20240926-184051
base: 92fc9636d1471b7f68bfee70c776f7f77e747b97
patch link: https://lore.kernel.org/r/20240617-starqltechn_integration_upstream-v5-2-761795ea5084%40gmail.com
patch subject: [PATCH v5 2/2] gcc-sdm845: Add general purpose clock ops
config: i386-buildonly-randconfig-006-20240929 (https://download.01.org/0day-ci/archive/20240929/202409290702.jlF0XWJZ-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290702.jlF0XWJZ-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/202409290702.jlF0XWJZ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/clk/qcom/clk-rcg2.c:431:13: warning: variable 'count' set but not used [-Wunused-but-set-variable]
431 | int i = 2, count = 0;
| ^
1 warning generated.
vim +/count +431 drivers/clk/qcom/clk-rcg2.c
427
428 static void clk_rcg2_calc_mnd(u64 parent_rate, u64 rate, struct freq_tbl *f,
429 unsigned int mnd_max, unsigned int pre_div_max)
430 {
> 431 int i = 2, count = 0;
432 unsigned int pre_div = 1;
433 unsigned long rates_gcd, scaled_parent_rate;
434 u16 m, n = 1, n_candidate = 1, n_max;
435
436 rates_gcd = gcd(parent_rate, rate);
437 m = div64_u64(rate, rates_gcd);
438 scaled_parent_rate = div64_u64(parent_rate, rates_gcd);
439 while (scaled_parent_rate > (mnd_max + m) * pre_div_max) {
440 // we're exceeding divisor's range, trying lower scale.
441 if (m > 1) {
442 m--;
443 scaled_parent_rate = mult_frac(scaled_parent_rate, m, (m + 1));
444 } else {
445 f->n = mnd_max + m;
446 f->pre_div = pre_div_max;
447 f->m = m;
448 }
449 }
450
451 n_max = m + mnd_max;
452
453 while (scaled_parent_rate > 1) {
454 while (scaled_parent_rate % i == 0) {
455 n_candidate *= i;
456 if (n_candidate < n_max)
457 n = n_candidate;
458 else if (pre_div * i < pre_div_max)
459 pre_div *= i;
460 else
461 clk_rcg2_split_div(i, &pre_div, &n, pre_div_max);
462
463 scaled_parent_rate /= i;
464 }
465 i++;
466 count++;
467 }
468
469 f->m = m;
470 f->n = n;
471 f->pre_div = pre_div > 1 ? pre_div : 0;
472 }
473
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-09-28 23:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 10:38 [PATCH v5 0/2] Add divisor computation feature for sdm845 gp clocks Dzmitry Sankouski
2024-09-26 10:38 ` [PATCH v5 1/2] clk: qcom: clk-rcg2: document calc_rate function Dzmitry Sankouski
2024-09-26 10:38 ` [PATCH v5 2/2] gcc-sdm845: Add general purpose clock ops Dzmitry Sankouski
2024-09-28 23:44 ` 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=202409290702.jlF0XWJZ-lkp@intel.com \
--to=lkp@intel.com \
--cc=andersson@kernel.org \
--cc=dsankouski@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mturquette@baylibre.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sboyd@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox