From: kernel test robot <lkp@intel.com>
To: Maxime Ripard <maxime@cerno.tech>,
Mike Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-clk@vger.kernel.org
Cc: kbuild-all@lists.01.org,
Naresh Kamboju <naresh.kamboju@linaro.org>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Yassine Oudjana <y.oudjana@protonmail.com>,
Tony Lindgren <tony@atomide.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Maxime Ripard <maxime@cerno.tech>
Subject: Re: [PATCH v4 22/28] clk: Stop forwarding clk_rate_requests to the parent
Date: Sat, 14 May 2022 10:12:59 +0800 [thread overview]
Message-ID: <202205141043.hBe4IIkE-lkp@intel.com> (raw)
In-Reply-To: <20220512160412.1317123-23-maxime@cerno.tech>
Hi Maxime,
I love your patch! Yet something to improve:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on linus/master v5.18-rc6]
[cannot apply to anholt/for-next]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Maxime-Ripard/clk-More-clock-rate-fixes-and-tests/20220513-001815
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: arm-sama5_defconfig (https://download.01.org/0day-ci/archive/20220514/202205141043.hBe4IIkE-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.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/intel-lab-lkp/linux/commit/2034099e179a2af8cd5752935973b61236748c0c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Maxime-Ripard/clk-More-clock-rate-fixes-and-tests/20220513-001815
git checkout 2034099e179a2af8cd5752935973b61236748c0c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/clk/at91/clk-generated.c: In function 'clk_generated_determine_rate':
>> drivers/clk/at91/clk-generated.c:192:49: error: passing argument 2 of 'clk_hw_forward_rate_request' from incompatible pointer type [-Werror=incompatible-pointer-types]
192 | clk_hw_forward_rate_request(hw, parent, req, &req_parent);
| ^~~~~~
| |
| struct clk_hw *
In file included from drivers/clk/at91/clk-generated.c:10:
include/linux/clk-provider.h:69:65: note: expected 'const struct clk_rate_request *' but argument is of type 'struct clk_hw *'
69 | const struct clk_rate_request *old_req,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
drivers/clk/at91/clk-generated.c:192:57: error: passing argument 3 of 'clk_hw_forward_rate_request' from incompatible pointer type [-Werror=incompatible-pointer-types]
192 | clk_hw_forward_rate_request(hw, parent, req, &req_parent);
| ^~~
| |
| struct clk_rate_request *
In file included from drivers/clk/at91/clk-generated.c:10:
include/linux/clk-provider.h:70:55: note: expected 'const struct clk_hw *' but argument is of type 'struct clk_rate_request *'
70 | const struct clk_hw *parent,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~
>> drivers/clk/at91/clk-generated.c:192:17: error: too few arguments to function 'clk_hw_forward_rate_request'
192 | clk_hw_forward_rate_request(hw, parent, req, &req_parent);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/clk/at91/clk-generated.c:10:
include/linux/clk-provider.h:68:6: note: declared here
68 | void clk_hw_forward_rate_request(const struct clk_hw *core,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/clk_hw_forward_rate_request +192 drivers/clk/at91/clk-generated.c
129
130 static int clk_generated_determine_rate(struct clk_hw *hw,
131 struct clk_rate_request *req)
132 {
133 struct clk_generated *gck = to_clk_generated(hw);
134 struct clk_hw *parent = NULL;
135 long best_rate = -EINVAL;
136 unsigned long min_rate, parent_rate;
137 int best_diff = -1;
138 int i;
139 u32 div;
140
141 /* do not look for a rate that is outside of our range */
142 if (gck->range.max && req->rate > gck->range.max)
143 req->rate = gck->range.max;
144 if (gck->range.min && req->rate < gck->range.min)
145 req->rate = gck->range.min;
146
147 for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
148 if (gck->chg_pid == i)
149 continue;
150
151 parent = clk_hw_get_parent_by_index(hw, i);
152 if (!parent)
153 continue;
154
155 parent_rate = clk_hw_get_rate(parent);
156 min_rate = DIV_ROUND_CLOSEST(parent_rate, GENERATED_MAX_DIV + 1);
157 if (!parent_rate ||
158 (gck->range.max && min_rate > gck->range.max))
159 continue;
160
161 div = DIV_ROUND_CLOSEST(parent_rate, req->rate);
162 if (div > GENERATED_MAX_DIV + 1)
163 div = GENERATED_MAX_DIV + 1;
164
165 clk_generated_best_diff(req, parent, parent_rate, div,
166 &best_diff, &best_rate);
167
168 if (!best_diff)
169 break;
170 }
171
172 /*
173 * The audio_pll rate can be modified, unlike the five others clocks
174 * that should never be altered.
175 * The audio_pll can technically be used by multiple consumers. However,
176 * with the rate locking, the first consumer to enable to clock will be
177 * the one definitely setting the rate of the clock.
178 * Since audio IPs are most likely to request the same rate, we enforce
179 * that the only clks able to modify gck rate are those of audio IPs.
180 */
181
182 if (gck->chg_pid < 0)
183 goto end;
184
185 parent = clk_hw_get_parent_by_index(hw, gck->chg_pid);
186 if (!parent)
187 goto end;
188
189 for (div = 1; div < GENERATED_MAX_DIV + 2; div++) {
190 struct clk_rate_request req_parent;
191
> 192 clk_hw_forward_rate_request(hw, parent, req, &req_parent);
193 req_parent.rate = req->rate * div;
194 if (__clk_determine_rate(parent, &req_parent))
195 continue;
196 clk_generated_best_diff(req, parent, req_parent.rate, div,
197 &best_diff, &best_rate);
198
199 if (!best_diff)
200 break;
201 }
202
203 end:
204 pr_debug("GCLK: %s, best_rate = %ld, parent clk: %s @ %ld\n",
205 __func__, best_rate,
206 __clk_get_name((req->best_parent_hw)->clk),
207 req->best_parent_rate);
208
209 if (best_rate < 0 || (gck->range.max && best_rate > gck->range.max))
210 return -EINVAL;
211
212 req->rate = best_rate;
213 return 0;
214 }
215
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-05-14 2:56 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 16:03 [PATCH v4 00/28] clk: More clock rate fixes and tests Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 01/28] clk: Drop the rate range on clk_put() Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 02/28] clk: Skip clamping when rounding if there's no boundaries Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 03/28] clk: Introduce clk_get_rate_range() Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 04/28] drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 05/28] clk: Mention that .recalc_rate can return 0 on error Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 06/28] clk: Clarify clk_get_rate() expectations Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 07/28] clk: tests: Add test suites description Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 08/28] clk: tests: Add reference to the orphan mux bug report Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 09/28] clk: tests: Add tests for uncached clock Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 10/28] clk: tests: Add tests for single parent mux Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 11/28] clk: tests: Add tests for mux with multiple parents Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 12/28] clk: tests: Add some tests for orphan " Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 13/28] clk: Take into account uncached clocks in clk_set_rate_range() Maxime Ripard
2022-05-24 18:32 ` Jim Quinlan
2022-05-25 8:30 ` Maxime Ripard
2022-05-25 17:59 ` Jim Quinlan
2022-05-26 16:39 ` Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 14/28] clk: Fix clk_get_parent() documentation Maxime Ripard
2022-05-12 16:03 ` [PATCH v4 15/28] clk: Set req_rate on reparenting Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 16/28] clk: Change clk_core_init_rate_req prototype Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 17/28] clk: Move clk_core_init_rate_req() from clk_core_round_rate_nolock() to its caller Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 18/28] clk: Introduce clk_hw_init_rate_request() Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 19/28] clk: Add our request boundaries in clk_core_init_rate_req Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 20/28] clk: Switch from __clk_determine_rate to clk_core_round_rate_nolock Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 21/28] clk: Introduce clk_core_has_parent() Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 22/28] clk: Stop forwarding clk_rate_requests to the parent Maxime Ripard
2022-05-14 2:12 ` kernel test robot [this message]
2022-05-12 16:04 ` [PATCH v4 23/28] clk: Zero the clk_rate_request structure Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 24/28] clk: Test the clock pointer in clk_hw_get_name() Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 25/28] clk: Introduce the clk_hw_get_rate_range function Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 26/28] clk: qcom: clk-rcg2: Take clock boundaries into consideration for gfx3d Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 27/28] clk: tests: Add some tests for clk_get_rate_range() Maxime Ripard
2022-05-12 16:04 ` [PATCH v4 28/28] clk: tests: Add missing test case for ranges Maxime Ripard
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=202205141043.hBe4IIkE-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=jbrunet@baylibre.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-clk@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maxime@cerno.tech \
--cc=mturquette@baylibre.com \
--cc=naresh.kamboju@linaro.org \
--cc=narmstrong@baylibre.com \
--cc=sboyd@kernel.org \
--cc=tony@atomide.com \
--cc=y.oudjana@protonmail.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