Skip to content

Commit ef4b0be

Browse files
geertupmladek
authored andcommitted
clk: renesas: cpg-mssr: Stop using printk format %pCr
Printk format "%pCr" will be removed soon, as clk_get_rate() must not be called in atomic context. Replace it by open-coding the operation. This is safe here, as the code runs in task context. Link: http://lkml.kernel.org/r/[email protected] To: Jia-Ju Bai <[email protected]> To: Jonathan Corbet <[email protected]> To: Michael Turquette <[email protected]> To: Stephen Boyd <[email protected]> To: Zhang Rui <[email protected]> To: Eduardo Valentin <[email protected]> To: Eric Anholt <[email protected]> To: Stefan Wahren <[email protected]> To: Greg Kroah-Hartman <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Geert Uytterhoeven <[email protected]> Cc: [email protected] # 4.5+ Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
1 parent 357aa6a commit ef4b0be

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/clk/renesas/renesas-cpg-mssr.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,9 @@ struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,
258258
dev_err(dev, "Cannot get %s clock %u: %ld", type, clkidx,
259259
PTR_ERR(clk));
260260
else
261-
dev_dbg(dev, "clock (%u, %u) is %pC at %pCr Hz\n",
262-
clkspec->args[0], clkspec->args[1], clk, clk);
261+
dev_dbg(dev, "clock (%u, %u) is %pC at %lu Hz\n",
262+
clkspec->args[0], clkspec->args[1], clk,
263+
clk_get_rate(clk));
263264
return clk;
264265
}
265266

@@ -326,7 +327,7 @@ static void __init cpg_mssr_register_core_clk(const struct cpg_core_clk *core,
326327
if (IS_ERR_OR_NULL(clk))
327328
goto fail;
328329

329-
dev_dbg(dev, "Core clock %pC at %pCr Hz\n", clk, clk);
330+
dev_dbg(dev, "Core clock %pC at %lu Hz\n", clk, clk_get_rate(clk));
330331
priv->clks[id] = clk;
331332
return;
332333

@@ -392,7 +393,7 @@ static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod,
392393
if (IS_ERR(clk))
393394
goto fail;
394395

395-
dev_dbg(dev, "Module clock %pC at %pCr Hz\n", clk, clk);
396+
dev_dbg(dev, "Module clock %pC at %lu Hz\n", clk, clk_get_rate(clk));
396397
priv->clks[id] = clk;
397398
priv->smstpcr_saved[clock->index / 32].mask |= BIT(clock->index % 32);
398399
return;

0 commit comments

Comments
 (0)