From: geert+renesas@glider.be (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] thermal: bcm2835: Stop using printk format %pCr
Date: Fri, 1 Jun 2018 11:28:20 +0200 [thread overview]
Message-ID: <1527845302-12159-3-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1527845302-12159-1-git-send-email-geert+renesas@glider.be>
Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
called in atomic context.
Replace it by printing the variable that already holds the clock rate.
Note that calling clk_get_rate() is safe here, as the code runs in task
context.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/thermal/broadcom/bcm2835_thermal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index a4d6a0e2e9938190..23ad4f9f21438e45 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)
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,
--
2.7.4
next prev parent reply other threads:[~2018-06-01 9:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
2018-06-01 9:28 ` [PATCH 1/4] clk: renesas: cpg-mssr: Stop using " Geert Uytterhoeven
2018-06-01 16:37 ` Stephen Boyd
2018-06-01 9:28 ` Geert Uytterhoeven [this message]
2018-06-01 9:35 ` [PATCH 2/4] thermal: bcm2835: " Stefan Wahren
2018-06-01 9:28 ` [PATCH 3/4] serial: sh-sci: " Geert Uytterhoeven
2018-06-01 9:28 ` [PATCH 4/4] lib/vsprintf: Remove atomic-unsafe support for %pCr Geert Uytterhoeven
2018-06-01 11:00 ` [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Linus Torvalds
2018-06-01 11:04 ` Andy Shevchenko
2018-06-01 11:47 ` Petr Mladek
2018-06-01 15:19 ` Petr Mladek
2018-06-01 15:28 ` Geert Uytterhoeven
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=1527845302-12159-3-git-send-email-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).