* [PATCH] clocksource: correct pr_err() output format
@ 2015-12-02 6:02 Vladimir Zapolskiy
2015-12-04 18:37 ` Joachim Eastwood
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2015-12-02 6:02 UTC (permalink / raw)
To: linux-arm-kernel
If by some reason timerclk is not available, both clockevent and
clocksource initializations correctly exit, but output of errno to
kernel log buffer may be confusing:
lpc32xx_clk_init: failed to map system control block registers
lpc32xx_clocksource_init: clock get failed (4294966779)
lpc32xx_clockevent_init: clock get failed (4294966779)
Use signed integer output in the correspondent pr_err() string formats:
lpc32xx_clocksource_init: clock get failed (-517)
lpc32xx_clockevent_init: clock get failed (-517)
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
drivers/clocksource/time-lpc32xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/time-lpc32xx.c b/drivers/clocksource/time-lpc32xx.c
index a1c06a2..1316876 100644
--- a/drivers/clocksource/time-lpc32xx.c
+++ b/drivers/clocksource/time-lpc32xx.c
@@ -125,7 +125,7 @@ static int __init lpc32xx_clocksource_init(struct device_node *np)
clk = of_clk_get_by_name(np, "timerclk");
if (IS_ERR(clk)) {
- pr_err("clock get failed (%lu)\n", PTR_ERR(clk));
+ pr_err("clock get failed (%ld)\n", PTR_ERR(clk));
return PTR_ERR(clk);
}
@@ -184,7 +184,7 @@ static int __init lpc32xx_clockevent_init(struct device_node *np)
clk = of_clk_get_by_name(np, "timerclk");
if (IS_ERR(clk)) {
- pr_err("clock get failed (%lu)\n", PTR_ERR(clk));
+ pr_err("clock get failed (%ld)\n", PTR_ERR(clk));
return PTR_ERR(clk);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] clocksource: correct pr_err() output format
2015-12-02 6:02 [PATCH] clocksource: correct pr_err() output format Vladimir Zapolskiy
@ 2015-12-04 18:37 ` Joachim Eastwood
0 siblings, 0 replies; 2+ messages in thread
From: Joachim Eastwood @ 2015-12-04 18:37 UTC (permalink / raw)
To: linux-arm-kernel
On 2 December 2015 at 07:02, Vladimir Zapolskiy <vz@mleia.com> wrote:
> If by some reason timerclk is not available, both clockevent and
> clocksource initializations correctly exit, but output of errno to
> kernel log buffer may be confusing:
>
> lpc32xx_clk_init: failed to map system control block registers
> lpc32xx_clocksource_init: clock get failed (4294966779)
> lpc32xx_clockevent_init: clock get failed (4294966779)
>
> Use signed integer output in the correspondent pr_err() string formats:
>
> lpc32xx_clocksource_init: clock get failed (-517)
> lpc32xx_clockevent_init: clock get failed (-517)
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Joachim Eastwood <manabian@gmail.com>
regards,
Joachim Eastwood
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-04 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 6:02 [PATCH] clocksource: correct pr_err() output format Vladimir Zapolskiy
2015-12-04 18:37 ` Joachim Eastwood
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).