From: kernel test robot <lkp@intel.com>
To: Haylen Chu <heylenay@4d2.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Haylen Chu <heylenay@outlook.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-riscv@lists.infradead.org,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Inochi Amaoto <inochiama@outlook.com>,
Chen Wang <unicornxdotw@foxmail.com>,
Jisheng Zhang <jszhang@kernel.org>
Subject: Re: [PATCH v3 3/3] clk: spacemit: Add clock support for Spacemit K1 SoC
Date: Fri, 29 Nov 2024 00:07:36 +0800 [thread overview]
Message-ID: <202411282305.iJ9x0lmj-lkp@intel.com> (raw)
In-Reply-To: <20241126143125.9980-7-heylenay@4d2.org>
Hi Haylen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 2d5404caa8c7bb5c4e0435f94b28834ae5456623]
url: https://github.com/intel-lab-lkp/linux/commits/Haylen-Chu/dt-bindings-clock-spacemit-Add-clock-controllers-of-Spacemit-K1-SoC/20241128-101248
base: 2d5404caa8c7bb5c4e0435f94b28834ae5456623
patch link: https://lore.kernel.org/r/20241126143125.9980-7-heylenay%404d2.org
patch subject: [PATCH v3 3/3] clk: spacemit: Add clock support for Spacemit K1 SoC
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20241128/202411282305.iJ9x0lmj-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282305.iJ9x0lmj-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/202411282305.iJ9x0lmj-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/clk/spacemit/ccu_pll.c: In function 'ccu_pll_set_rate':
>> drivers/clk/spacemit/ccu_pll.c:128:23: warning: variable 'old_rate' set but not used [-Wunused-but-set-variable]
128 | unsigned long old_rate;
| ^~~~~~~~
--
drivers/clk/spacemit/ccu_mix.c: In function 'ccu_mix_set_rate':
>> drivers/clk/spacemit/ccu_mix.c:180:23: warning: variable 'best_rate' set but not used [-Wunused-but-set-variable]
180 | unsigned long best_rate = 0;
| ^~~~~~~~~
--
drivers/clk/spacemit/ccu_ddn.c: In function 'clk_ddn_set_rate':
>> drivers/clk/spacemit/ccu_ddn.c:115:23: warning: variable 'prev_rate' set but not used [-Wunused-but-set-variable]
115 | unsigned long prev_rate, rate = 0;
| ^~~~~~~~~
vim +/old_rate +128 drivers/clk/spacemit/ccu_pll.c
115
116 /*
117 * pll rate change requires sequence:
118 * clock off -> change rate setting -> clock on
119 * This function doesn't really change rate, but cache the config
120 */
121 static int ccu_pll_set_rate(struct clk_hw *hw, unsigned long rate,
122 unsigned long parent_rate)
123 {
124 struct ccu_pll *p = hw_to_ccu_pll(hw);
125 struct ccu_common *common = &p->common;
126 struct ccu_pll_config *params = &p->pll;
127 struct ccu_pll_rate_tbl *entry;
> 128 unsigned long old_rate;
129 bool found = false;
130 u32 mask, val;
131 int i;
132
133 if (ccu_pll_is_enabled(hw)) {
134 pr_err("%s %s is enabled, ignore the setrate!\n",
135 __func__, __clk_get_name(hw->clk));
136 return 0;
137 }
138
139 old_rate = __get_vco_freq(hw);
140
141 for (i = 0; i < params->tbl_size; i++) {
142 if (rate == params->rate_tbl[i].rate) {
143 found = true;
144 entry = ¶ms->rate_tbl[i];
145 break;
146 }
147 }
148 WARN_ON_ONCE(!found);
149
150 mask = PLL_SWCR1_REG5_MASK | PLL_SWCR1_REG6_MASK;
151 mask |= PLL_SWCR1_REG7_MASK | PLL_SWCR1_REG8_MASK;
152 val |= entry->reg5 << PLL_SWCR1_REG5_OFF;
153 val |= entry->reg6 << PLL_SWCR1_REG6_OFF;
154 val |= entry->reg7 << PLL_SWCR1_REG7_OFF;
155 val |= entry->reg8 << PLL_SWCR1_REG8_OFF;
156 ccu_update(swcr1, common, mask, val);
157
158 mask = PLL_SWCR3_DIV_INT_MASK | PLL_SWCR3_DIV_FRC_MASK;
159 val = entry->div_int << PLL_SWCR3_DIV_INT_OFF;
160 val |= entry->div_frac << PLL_SWCR3_DIV_FRC_OFF;
161 ccu_update(swcr3, common, mask, val);
162
163 return 0;
164 }
165
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-11-28 16:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 14:31 [PATCH v3 0/3] Add clock controller support for Spacemit K1 Haylen Chu
2024-11-26 14:31 ` [PATCH v3 1/3] dt-bindings: clock: spacemit: Add clock controllers of Spacemit K1 SoC Haylen Chu
2024-11-26 14:48 ` Krzysztof Kozlowski
2024-11-27 8:03 ` Krzysztof Kozlowski
2024-11-27 10:37 ` Haylen Chu
2024-11-26 14:31 ` [PATCH v3 2/3] dt-bindings: soc: spacemit: Add spacemit,k1-syscon Haylen Chu
2024-11-26 14:46 ` Krzysztof Kozlowski
2024-11-26 14:50 ` Krzysztof Kozlowski
2024-11-27 11:01 ` Haylen Chu
2024-11-26 14:31 ` [PATCH v3 3/3] clk: spacemit: Add clock support for Spacemit K1 SoC Haylen Chu
2024-11-28 6:50 ` kernel test robot
2024-11-28 16:07 ` kernel test robot [this message]
2024-11-29 15:31 ` kernel test robot
2024-12-08 6:47 ` Inochi Amaoto
2024-12-18 7:27 ` Yixun Lan
2024-12-18 9:03 ` Inochi Amaoto
2024-12-18 12:36 ` Haylen Chu
2024-12-09 6:51 ` Dan Carpenter
2024-11-26 14:44 ` [PATCH v3 0/3] Add clock controller support for Spacemit K1 Krzysztof Kozlowski
2024-11-27 10:55 ` Haylen Chu
2024-12-04 11:54 ` Emil Renner Berthing
2024-12-18 7:31 ` Yixun Lan
2024-12-18 10:46 ` Haylen Chu
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=202411282305.iJ9x0lmj-lkp@intel.com \
--to=lkp@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heylenay@4d2.org \
--cc=heylenay@outlook.com \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=unicornxdotw@foxmail.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