Skip to content

Commit

Permalink
Merge branch 'for-4.18-vsprintf-pcr-removal' into for-4.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Mladek committed Jun 5, 2018
2 parents bcf8677 + 666902e commit 8bafa2a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
3 changes: 1 addition & 2 deletions Documentation/core-api/printk-formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,10 @@ struct clk

%pC pll1
%pCn pll1
%pCr 1560000000

For printing struct clk structures. %pC and %pCn print the name
(Common Clock Framework) or address (legacy clock framework) of the
structure; %pCr prints the current clock rate.
structure.

Passed by reference.

Expand Down
9 changes: 5 additions & 4 deletions drivers/clk/renesas/renesas-cpg-mssr.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@ struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,
dev_err(dev, "Cannot get %s clock %u: %ld", type, clkidx,
PTR_ERR(clk));
else
dev_dbg(dev, "clock (%u, %u) is %pC at %pCr Hz\n",
clkspec->args[0], clkspec->args[1], clk, clk);
dev_dbg(dev, "clock (%u, %u) is %pC at %lu Hz\n",
clkspec->args[0], clkspec->args[1], clk,
clk_get_rate(clk));
return clk;
}

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

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

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

dev_dbg(dev, "Module clock %pC at %pCr Hz\n", clk, clk);
dev_dbg(dev, "Module clock %pC at %lu Hz\n", clk, clk_get_rate(clk));
priv->clks[id] = clk;
priv->smstpcr_saved[clock->index / 32].mask |= BIT(clock->index % 32);
return;
Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/broadcom/bcm2835_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
rate = clk_get_rate(data->clk);
if ((rate < 1920000) || (rate > 5000000))
dev_warn(&pdev->dev,
"Clock %pCn running at %pCr Hz is outside of the recommended range: 1.92 to 5MHz\n",
data->clk, data->clk);
"Clock %pCn running at %lu Hz is outside of the recommended range: 1.92 to 5MHz\n",
data->clk, rate);

/* register of thermal sensor and get info from DT */
tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data,
Expand Down
4 changes: 2 additions & 2 deletions drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2704,8 +2704,8 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
dev_dbg(dev, "failed to get %s (%ld)\n", clk_names[i],
PTR_ERR(clk));
else
dev_dbg(dev, "clk %s is %pC rate %pCr\n", clk_names[i],
clk, clk);
dev_dbg(dev, "clk %s is %pC rate %lu\n", clk_names[i],
clk, clk_get_rate(clk));
sci_port->clks[i] = IS_ERR(clk) ? NULL : clk;
}
return 0;
Expand Down
3 changes: 0 additions & 3 deletions lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,9 +1459,6 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
return string(buf, end, NULL, spec);

switch (fmt[1]) {
case 'r':
return number(buf, end, clk_get_rate(clk), spec);

case 'n':
default:
#ifdef CONFIG_COMMON_CLK
Expand Down

0 comments on commit 8bafa2a

Please sign in to comment.