mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/pistachio: Correct output format of PTR_ERR()
@ 2016-03-21 23:42 Vladimir Zapolskiy
  2016-03-22  0:44 ` Ezequiel Garcia
  2016-03-23 11:33 ` [tip:timers/urgent] " tip-bot for Vladimir Zapolskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Zapolskiy @ 2016-03-21 23:42 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, Jisheng Zhang, Ezequiel Garcia

Use signed integer output in the pr_err() string format, here
PTR_ERR() value is negative and it should be reported in human
readable way.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: Jisheng Zhang <jszhang@marvell.com>
Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
---
I've occasionally found this issue, which most probably is copy-pasted
from/to drivers/clocksource/time-lpc32xx.c and recently fixed by commit
d662ed204357 ("clocksource/drivers/lpc32: Correct pr_err() output format").

 drivers/clocksource/time-pistachio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c
index 3269d9e..376e59b 100644
--- a/drivers/clocksource/time-pistachio.c
+++ b/drivers/clocksource/time-pistachio.c
@@ -163,7 +163,7 @@ static void __init pistachio_clksrc_of_init(struct device_node *node)
 
 	periph_regs = syscon_regmap_lookup_by_phandle(node, "img,cr-periph");
 	if (IS_ERR(periph_regs)) {
-		pr_err("cannot get peripheral regmap (%lu)\n",
+		pr_err("cannot get peripheral regmap (%ld)\n",
 		       PTR_ERR(periph_regs));
 		return;
 	}
@@ -176,7 +176,7 @@ static void __init pistachio_clksrc_of_init(struct device_node *node)
 
 	sys_clk = of_clk_get_by_name(node, "sys");
 	if (IS_ERR(sys_clk)) {
-		pr_err("clock get failed (%lu)\n", PTR_ERR(sys_clk));
+		pr_err("clock get failed (%ld)\n", PTR_ERR(sys_clk));
 		return;
 	}
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clocksource/drivers/pistachio: Correct output format of PTR_ERR()
  2016-03-21 23:42 [PATCH] clocksource/drivers/pistachio: Correct output format of PTR_ERR() Vladimir Zapolskiy
@ 2016-03-22  0:44 ` Ezequiel Garcia
  2016-03-23 11:33 ` [tip:timers/urgent] " tip-bot for Vladimir Zapolskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Ezequiel Garcia @ 2016-03-22  0:44 UTC (permalink / raw)
  To: Vladimir Zapolskiy
  Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, Jisheng Zhang

On 22 Mar 01:42 AM, Vladimir Zapolskiy wrote:
> Use signed integer output in the pr_err() string format, here
> PTR_ERR() value is negative and it should be reported in human
> readable way.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

Thanks for the fix,
-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:timers/urgent] clocksource/drivers/pistachio: Correct output format of PTR_ERR()
  2016-03-21 23:42 [PATCH] clocksource/drivers/pistachio: Correct output format of PTR_ERR() Vladimir Zapolskiy
  2016-03-22  0:44 ` Ezequiel Garcia
@ 2016-03-23 11:33 ` tip-bot for Vladimir Zapolskiy
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Vladimir Zapolskiy @ 2016-03-23 11:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, daniel.lezcano, linux-kernel, vz, hpa, jszhang,
	ezequiel.garcia, tglx

Commit-ID:  b7c8b4aac6ea6746b1c49fda0a0563a07203dd26
Gitweb:     http://git.kernel.org/tip/b7c8b4aac6ea6746b1c49fda0a0563a07203dd26
Author:     Vladimir Zapolskiy <vz@mleia.com>
AuthorDate: Tue, 22 Mar 2016 01:42:07 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 23 Mar 2016 12:30:40 +0100

clocksource/drivers/pistachio: Correct output format of PTR_ERR()

Use signed integer output in the pr_err() string format, here PTR_ERR() value
is negative and it should be reported in human readable way.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: Jisheng Zhang <jszhang@marvell.com>
Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: http://lkml.kernel.org/r/1458603727-4446-1-git-send-email-vz@mleia.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 drivers/clocksource/time-pistachio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c
index 3269d9e..376e59b 100644
--- a/drivers/clocksource/time-pistachio.c
+++ b/drivers/clocksource/time-pistachio.c
@@ -163,7 +163,7 @@ static void __init pistachio_clksrc_of_init(struct device_node *node)
 
 	periph_regs = syscon_regmap_lookup_by_phandle(node, "img,cr-periph");
 	if (IS_ERR(periph_regs)) {
-		pr_err("cannot get peripheral regmap (%lu)\n",
+		pr_err("cannot get peripheral regmap (%ld)\n",
 		       PTR_ERR(periph_regs));
 		return;
 	}
@@ -176,7 +176,7 @@ static void __init pistachio_clksrc_of_init(struct device_node *node)
 
 	sys_clk = of_clk_get_by_name(node, "sys");
 	if (IS_ERR(sys_clk)) {
-		pr_err("clock get failed (%lu)\n", PTR_ERR(sys_clk));
+		pr_err("clock get failed (%ld)\n", PTR_ERR(sys_clk));
 		return;
 	}
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-23 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 23:42 [PATCH] clocksource/drivers/pistachio: Correct output format of PTR_ERR() Vladimir Zapolskiy
2016-03-22  0:44 ` Ezequiel Garcia
2016-03-23 11:33 ` [tip:timers/urgent] " tip-bot for Vladimir Zapolskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome