From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Geert Uytterhoeven To: Jia-Ju Bai , Jonathan Corbet , Michael Turquette , Stephen Boyd , Zhang Rui , Eduardo Valentin , Eric Anholt , Stefan Wahren , Greg Kroah-Hartman Cc: Sergey Senozhatsky , Petr Mladek , Linus Torvalds , Steven Rostedt , linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/4] thermal: bcm2835: Stop using printk format %pCr Date: Fri, 1 Jun 2018 11:28:20 +0200 Message-Id: <1527845302-12159-3-git-send-email-geert+renesas@glider.be> In-Reply-To: <1527845302-12159-1-git-send-email-geert+renesas@glider.be> References: <1527845302-12159-1-git-send-email-geert+renesas@glider.be> List-ID: 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 --- 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