From: kernel test robot <lkp@intel.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Cercueil <paul@crapouillou.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
letux-kernel@openphoenux.org, kernel@pyra-handheld.com,
Paul Boddie <paul@boddie.org.uk>,
"H. Nikolaus Schaller" <hns@goldelico.com>
Subject: Re: [PATCH 2/4] clk: ingenic: Add Ingenic X1600 CGU clock driver support
Date: Mon, 26 Oct 2026 18:16:37 +0800 [thread overview]
Message-ID: <202610261821.QhaEUvEU-lkp@intel.com> (raw)
In-Reply-To: <50983be55e467076e83e3ffc37b30fc4e5648e15.1792955907.git.hns@goldelico.com>
Hi Nikolaus,
kernel test robot noticed the following build warnings:
[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next linus/master v7.3 next-20261023]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/H-Nikolaus-Schaller/dt-bindings-clock-Add-Ingenic-X1600-CGU-bindings/20261025-201824
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link: https://lore.kernel.org/r/50983be55e467076e83e3ffc37b30fc4e5648e15.1792955907.git.hns%40goldelico.com
patch subject: [PATCH 2/4] clk: ingenic: Add Ingenic X1600 CGU clock driver support
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20261026/202610261821.QhaEUvEU-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 186e70f4e6a1521991d2340d3d49b23b1beff11f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261026/202610261821.QhaEUvEU-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/202610261821.QhaEUvEU-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/clk/ingenic/x1600-cgu.c:129:38: warning: variable 'm' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
129 | for (od_combined = od_combined_min; od_combined <= od_combined_max; od_combined++) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ingenic/x1600-cgu.c:141:8: note: uninitialized use occurs here
141 | *pm = m;
| ^
drivers/clk/ingenic/x1600-cgu.c:129:38: note: remove the condition if it is always true
129 | for (od_combined = od_combined_min; od_combined <= od_combined_max; od_combined++) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ingenic/x1600-cgu.c:115:17: note: initialize the variable 'm' to silence this warning
115 | unsigned long m, n;
| ^
| = 0
>> drivers/clk/ingenic/x1600-cgu.c:129:38: warning: variable 'n' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
129 | for (od_combined = od_combined_min; od_combined <= od_combined_max; od_combined++) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ingenic/x1600-cgu.c:142:8: note: uninitialized use occurs here
142 | *pn = n;
| ^
drivers/clk/ingenic/x1600-cgu.c:129:38: note: remove the condition if it is always true
129 | for (od_combined = od_combined_min; od_combined <= od_combined_max; od_combined++) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/ingenic/x1600-cgu.c:115:20: note: initialize the variable 'n' to silence this warning
115 | unsigned long m, n;
| ^
| = 0
2 warnings generated.
vim +129 drivers/clk/ingenic/x1600-cgu.c
104
105 static void
106 x1600_pll_calc_m_n_od(const struct ingenic_cgu_pll_info *pll_info,
107 unsigned long rate, unsigned long parent_rate,
108 unsigned int *pm, unsigned int *pn, unsigned int *pod,
109 unsigned int *pod1)
110 {
111 const unsigned int od_max = pll_info->od_max - 1;
112 const unsigned int od1_max = pll_info->od1_max - 1;
113 const unsigned int m_max = GENMASK(pll_info->m_bits - 1, 0);
114 const unsigned int n_max = GENMASK(pll_info->n_bits - 1, 0);
115 unsigned long m, n;
116 unsigned int od = 1, od1 = 1;
117 const unsigned long fvco_min = 600000000, fvco_max = 2400000000;
118 unsigned long fvco;
119
120 /*
121 * Combined output divider range:
122 *
123 * ceil(fvco_min / rate) - fvco_max / rate
124 */
125 unsigned int od_combined_min = (fvco_min + rate) / rate;
126 unsigned int od_combined_max = fvco_max / rate;
127 unsigned int od_combined;
128
> 129 for (od_combined = od_combined_min; od_combined <= od_combined_max; od_combined++) {
130 od = int_sqrt(od_combined);
131 od1 = od_combined / od;
132
133 /* od == floor(sqrt(od_combined)); od1 >= od */
134 if ((od * od1 == od_combined) && od <= od_max && od1 <= od1_max) {
135 fvco = rate * od_combined;
136 rational_best_approximation(fvco, parent_rate, m_max, n_max, &m, &n);
137 break;
138 }
139 }
140
141 *pm = m;
142 *pn = n;
143 *pod = od;
144 *pod1 = od1;
145 }
146
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-10-26 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 19:18 [PATCH 0/4] clk / clocksource: Add Ingenic X1600 SoC support H. Nikolaus Schaller
2026-10-25 19:18 ` [PATCH 1/4] dt-bindings: clock: Add Ingenic X1600 CGU bindings H. Nikolaus Schaller
2026-10-25 19:18 ` [PATCH 2/4] clk: ingenic: Add Ingenic X1600 CGU clock driver support H. Nikolaus Schaller
2026-10-26 10:16 ` kernel test robot [this message]
2026-10-25 19:18 ` [PATCH 3/4] clk: ingenic: jz4760-cgu: Adapt calc_m_n_od() to core framework changes H. Nikolaus Schaller
2026-10-25 22:54 ` Paul Cercueil
2026-10-25 19:18 ` [PATCH 4/4] clk: ingenic: x1000-cgu: " H. Nikolaus Schaller
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=202610261821.QhaEUvEU-lkp@intel.com \
--to=lkp@intel.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hns@goldelico.com \
--cc=jbrunet+clk@baylibre.com \
--cc=kernel@pyra-handheld.com \
--cc=krzk@kernel.org \
--cc=letux-kernel@openphoenux.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul@boddie.org.uk \
--cc=paul@crapouillou.net \
--cc=robh@kernel.org \
--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
all inboxes | Powered by JetHome®