Subject: [PATCH 4.16 25/43] serial: sh-sci: Stop using printk format %pCr

From: [email-masked] (Greg Kroah-Hartman)
Date: Thu, 14 Jun 2018 16:04:29 +0200

4.16-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geert Uytterhoeven <[email-masked]>

commit d63c16f8e1ab761775275adcf54f4bef7c330295 upstream.

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/1527845302-12159-4-git-send-email-geert+renesas at glider.be
To: Jia-Ju Bai <[email-masked]>
To: Jonathan Corbet <[email-masked]>
To: Michael Turquette <[email-masked]>
To: Stephen Boyd <[email-masked]>
To: Zhang Rui <[email-masked]>
To: Eduardo Valentin <[email-masked]>
To: Eric Anholt <[email-masked]>
To: Stefan Wahren <[email-masked]>
To: Greg Kroah-Hartman <[email-masked]>
Cc: Sergey Senozhatsky <[email-masked]>
Cc: Petr Mladek <[email-masked]>
Cc: Linus Torvalds <[email-masked]>
Cc: Steven Rostedt <[email-masked]>
Cc: linux-doc at vger.kernel.org
Cc: linux-clk at vger.kernel.org
Cc: linux-pm at vger.kernel.org
Cc: linux-serial at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-renesas-soc at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: Geert Uytterhoeven <[email-masked]>
Cc: stable at vger.kernel.org # 4.5+
Signed-off-by: Geert Uytterhoeven <[email-masked]>
Signed-off-by: Petr Mladek <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 drivers/tty/serial/sh-sci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2691,8 +2691,8 @@ found:
 			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;