* [PATCH 1/1] clk: imx: pll14xx: Use unsigned format specifier
@ 2026-03-17 9:33 Alexander Stein
2026-03-17 9:48 ` Daniel Baluta
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2026-03-17 9:33 UTC (permalink / raw)
To: Abel Vesa, Peng Fan, Michael Turquette, Stephen Boyd, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
Cc: Alexander Stein, linux-clk, imx, linux-arm-kernel, linux-kernel
The debug outputs use %d for clock rates resulting in negative clock rate
during rate calculation.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
drivers/clk/imx/clk-pll14xx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 7552aaafc3395..701a7a02235cc 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -151,7 +151,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
/* First try if we can get the desired rate from one of the static entries */
tt = imx_get_pll_settings(pll, rate);
if (tt) {
- pr_debug("%s: in=%ld, want=%ld, Using PLL setting from table\n",
+ pr_debug("%s: in=%lu, want=%lu, Using PLL setting from table\n",
clk_hw_get_name(&pll->hw), prate, rate);
t->rate = tt->rate;
t->mdiv = tt->mdiv;
@@ -173,7 +173,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
if (rate >= rate_min && rate <= rate_max) {
kdiv = pll1443x_calc_kdiv(mdiv, pdiv, sdiv, rate, prate);
- pr_debug("%s: in=%ld, want=%ld Only adjust kdiv %ld -> %d\n",
+ pr_debug("%s: in=%lu, want=%lu Only adjust kdiv %ld -> %d\n",
clk_hw_get_name(&pll->hw), prate, rate,
FIELD_GET(KDIV_MASK, pll_div_ctl1), kdiv);
fout = pll14xx_calc_rate(pll, mdiv, pdiv, sdiv, kdiv, prate);
@@ -211,7 +211,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
}
}
found:
- pr_debug("%s: in=%ld, want=%ld got=%d (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
+ pr_debug("%s: in=%ld, want=%lu got=%u (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
clk_hw_get_name(&pll->hw), prate, rate, t->rate, t->pdiv, t->sdiv,
t->mdiv, t->kdiv);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] clk: imx: pll14xx: Use unsigned format specifier
2026-03-17 9:33 [PATCH 1/1] clk: imx: pll14xx: Use unsigned format specifier Alexander Stein
@ 2026-03-17 9:48 ` Daniel Baluta
2026-03-17 10:13 ` Daniel Baluta
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Baluta @ 2026-03-17 9:48 UTC (permalink / raw)
To: Alexander Stein, Abel Vesa, Peng Fan, Michael Turquette,
Stephen Boyd, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: linux-clk, imx, linux-arm-kernel, linux-kernel
On 3/17/26 11:33, Alexander Stein wrote:
> The debug outputs use %d for clock rates resulting in negative clock rate
> during rate calculation.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> drivers/clk/imx/clk-pll14xx.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
> index 7552aaafc3395..701a7a02235cc 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -151,7 +151,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
> /* First try if we can get the desired rate from one of the static entries */
> tt = imx_get_pll_settings(pll, rate);
> if (tt) {
> - pr_debug("%s: in=%ld, want=%ld, Using PLL setting from table\n",
> + pr_debug("%s: in=%lu, want=%lu, Using PLL setting from table\n",
> clk_hw_get_name(&pll->hw), prate, rate);
> t->rate = tt->rate;
> t->mdiv = tt->mdiv;
> @@ -173,7 +173,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
>
> if (rate >= rate_min && rate <= rate_max) {
> kdiv = pll1443x_calc_kdiv(mdiv, pdiv, sdiv, rate, prate);
> - pr_debug("%s: in=%ld, want=%ld Only adjust kdiv %ld -> %d\n",
> + pr_debug("%s: in=%lu, want=%lu Only adjust kdiv %ld -> %d\n",
> clk_hw_get_name(&pll->hw), prate, rate,
> FIELD_GET(KDIV_MASK, pll_div_ctl1), kdiv);
> fout = pll14xx_calc_rate(pll, mdiv, pdiv, sdiv, kdiv, prate);
> @@ -211,7 +211,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
> }
> }
> found:
> - pr_debug("%s: in=%ld, want=%ld got=%d (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
> + pr_debug("%s: in=%ld, want=%lu got=%u (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
Since you are here, I think this should be 'got = %lu' instead of %u.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] clk: imx: pll14xx: Use unsigned format specifier
2026-03-17 9:48 ` Daniel Baluta
@ 2026-03-17 10:13 ` Daniel Baluta
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Baluta @ 2026-03-17 10:13 UTC (permalink / raw)
To: Alexander Stein, Abel Vesa, Peng Fan, Michael Turquette,
Stephen Boyd, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: linux-clk, imx, linux-arm-kernel, linux-kernel
On 3/17/26 11:48, Daniel Baluta wrote:
> On 3/17/26 11:33, Alexander Stein wrote:
>> The debug outputs use %d for clock rates resulting in negative clock rate
>> during rate calculation.
>>
>> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>> ---
>> drivers/clk/imx/clk-pll14xx.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
>> index 7552aaafc3395..701a7a02235cc 100644
>> --- a/drivers/clk/imx/clk-pll14xx.c
>> +++ b/drivers/clk/imx/clk-pll14xx.c
>> @@ -151,7 +151,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
>> /* First try if we can get the desired rate from one of the static entries */
>> tt = imx_get_pll_settings(pll, rate);
>> if (tt) {
>> - pr_debug("%s: in=%ld, want=%ld, Using PLL setting from table\n",
>> + pr_debug("%s: in=%lu, want=%lu, Using PLL setting from table\n",
>> clk_hw_get_name(&pll->hw), prate, rate);
>> t->rate = tt->rate;
>> t->mdiv = tt->mdiv;
>> @@ -173,7 +173,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
>>
>> if (rate >= rate_min && rate <= rate_max) {
>> kdiv = pll1443x_calc_kdiv(mdiv, pdiv, sdiv, rate, prate);
>> - pr_debug("%s: in=%ld, want=%ld Only adjust kdiv %ld -> %d\n",
>> + pr_debug("%s: in=%lu, want=%lu Only adjust kdiv %ld -> %d\n",
>> clk_hw_get_name(&pll->hw), prate, rate,
>> FIELD_GET(KDIV_MASK, pll_div_ctl1), kdiv);
>> fout = pll14xx_calc_rate(pll, mdiv, pdiv, sdiv, kdiv, prate);
>> @@ -211,7 +211,7 @@ static void imx_pll14xx_calc_settings(struct clk_pll14xx *pll, unsigned long rat
>> }
>> }
>> found:
>> - pr_debug("%s: in=%ld, want=%ld got=%d (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
>> + pr_debug("%s: in=%ld, want=%lu got=%u (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
> Since you are here, I think this should be 'got = %lu' instead of %u.
>
>
Correction, I think that 3rd parameter is OK, first one could go form %ld -> %lu.
- pr_debug("%s: in=%ld, want=%ld got=%d (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
+ pr_debug("%s: in=%lu, want=%lu got=%u (pdiv=%d sdiv=%d mdiv=%d kdiv=%d)\n",
clk_hw_get_name(&pll->hw), prate, rate, t->rate, t->pdiv, t->sdiv,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-17 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 9:33 [PATCH 1/1] clk: imx: pll14xx: Use unsigned format specifier Alexander Stein
2026-03-17 9:48 ` Daniel Baluta
2026-03-17 10:13 ` Daniel Baluta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox