aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2018-06-05 07:39:12 -0400
committerPetr Mladek <pmladek@suse.com>2018-06-05 07:39:12 -0400
commit8bafa2a44ff3647904eaa3c9228bfbd36742b9b4 (patch)
treec0bc2ef9e965e50e57aaa22293084ee308b41d3f
parentbcf8677bc621e0e3b6ed67668d6bd72908fdec2c (diff)
parent666902e42fd8344b923c02dc5b0f37948ff4f225 (diff)
Merge branch 'for-4.18-vsprintf-pcr-removal' into for-4.18
-rw-r--r--Documentation/core-api/printk-formats.rst3
-rw-r--r--drivers/clk/renesas/renesas-cpg-mssr.c9
-rw-r--r--drivers/thermal/broadcom/bcm2835_thermal.c4
-rw-r--r--drivers/tty/serial/sh-sci.c4
-rw-r--r--lib/vsprintf.c3
5 files changed, 10 insertions, 13 deletions
diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
index eb30efdd2e78..25dc591cb110 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -419,11 +419,10 @@ struct clk
419 419
420 %pC pll1 420 %pC pll1
421 %pCn pll1 421 %pCn pll1
422 %pCr 1560000000
423 422
424For printing struct clk structures. %pC and %pCn print the name 423For printing struct clk structures. %pC and %pCn print the name
425(Common Clock Framework) or address (legacy clock framework) of the 424(Common Clock Framework) or address (legacy clock framework) of the
426structure; %pCr prints the current clock rate. 425structure.
427 426
428Passed by reference. 427Passed by reference.
429 428
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index e3cc72c81311..2c9988fef656 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -258,8 +258,9 @@ struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,
258 dev_err(dev, "Cannot get %s clock %u: %ld", type, clkidx, 258 dev_err(dev, "Cannot get %s clock %u: %ld", type, clkidx,
259 PTR_ERR(clk)); 259 PTR_ERR(clk));
260 else 260 else
261 dev_dbg(dev, "clock (%u, %u) is %pC at %pCr Hz\n", 261 dev_dbg(dev, "clock (%u, %u) is %pC at %lu Hz\n",
262 clkspec->args[0], clkspec->args[1], clk, clk); 262 clkspec->args[0], clkspec->args[1], clk,
263 clk_get_rate(clk));
263 return clk; 264 return clk;
264} 265}
265 266
@@ -326,7 +327,7 @@ static void __init cpg_mssr_register_core_clk(const struct cpg_core_clk *core,
326 if (IS_ERR_OR_NULL(clk)) 327 if (IS_ERR_OR_NULL(clk))
327 goto fail; 328 goto fail;
328 329
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));
330 priv->clks[id] = clk; 331 priv->clks[id] = clk;
331 return; 332 return;
332 333
@@ -392,7 +393,7 @@ static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod,
392 if (IS_ERR(clk)) 393 if (IS_ERR(clk))
393 goto fail; 394 goto fail;
394 395
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));
396 priv->clks[id] = clk; 397 priv->clks[id] = clk;
397 priv->smstpcr_saved[clock->index / 32].mask |= BIT(clock->index % 32); 398 priv->smstpcr_saved[clock->index / 32].mask |= BIT(clock->index % 32);
398 return; 399 return;
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index a4d6a0e2e993..23ad4f9f2143 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -213,8 +213,8 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
213 rate = clk_get_rate(data->clk); 213 rate = clk_get_rate(data->clk);
214 if ((rate < 1920000) || (rate > 5000000)) 214 if ((rate < 1920000) || (rate > 5000000))
215 dev_warn(&pdev->dev, 215 dev_warn(&pdev->dev,
216 "Clock %pCn running at %pCr Hz is outside of the recommended range: 1.92 to 5MHz\n", 216 "Clock %pCn running at %lu Hz is outside of the recommended range: 1.92 to 5MHz\n",
217 data->clk, data->clk); 217 data->clk, rate);
218 218
219 /* register of thermal sensor and get info from DT */ 219 /* register of thermal sensor and get info from DT */
220 tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data, 220 tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data,
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index fdbbff547106..a4f82ec665fe 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2704,8 +2704,8 @@ found:
2704 dev_dbg(dev, "failed to get %s (%ld)\n", clk_names[i], 2704 dev_dbg(dev, "failed to get %s (%ld)\n", clk_names[i],
2705 PTR_ERR(clk)); 2705 PTR_ERR(clk));
2706 else 2706 else
2707 dev_dbg(dev, "clk %s is %pC rate %pCr\n", clk_names[i], 2707 dev_dbg(dev, "clk %s is %pC rate %lu\n", clk_names[i],
2708 clk, clk); 2708 clk, clk_get_rate(clk));
2709 sci_port->clks[i] = IS_ERR(clk) ? NULL : clk; 2709 sci_port->clks[i] = IS_ERR(clk) ? NULL : clk;
2710 } 2710 }
2711 return 0; 2711 return 0;
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 7649ef4ed7d0..8999202ad43b 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1459,9 +1459,6 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
1459 return string(buf, end, NULL, spec); 1459 return string(buf, end, NULL, spec);
1460 1460
1461 switch (fmt[1]) { 1461 switch (fmt[1]) {
1462 case 'r':
1463 return number(buf, end, clk_get_rate(clk), spec);
1464
1465 case 'n': 1462 case 'n':
1466 default: 1463 default:
1467#ifdef CONFIG_COMMON_CLK 1464#ifdef CONFIG_COMMON_CLK