[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-542f824607a6968ea443208ccfef3b7daf503559@git.kernel.org>
Date: Mon, 8 Jan 2018 09:27:18 -0800
From: tip-bot for Romain Izard <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, romain.izard.pro@...il.com,
daniel.lezcano@...aro.org, torvalds@...ux-foundation.org,
nicolas.ferre@...rochip.com, hpa@...or.com, peterz@...radead.org,
tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [tip:timers/core] clocksource/drivers/tcb_clksrc: Fix clock speed
message
Commit-ID: 542f824607a6968ea443208ccfef3b7daf503559
Gitweb: https://git.kernel.org/tip/542f824607a6968ea443208ccfef3b7daf503559
Author: Romain Izard <romain.izard.pro@...il.com>
AuthorDate: Mon, 8 Jan 2018 14:28:43 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 8 Jan 2018 17:57:23 +0100
clocksource/drivers/tcb_clksrc: Fix clock speed message
The clock speed displayed at boot in an information message was 500 kHz
too high compared to its real value. As the value is not used anywhere,
there is no functional impact.
Fix the rounding formula to display the correct value.
Signed-off-by: Romain Izard <romain.izard.pro@...il.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1515418139-23276-4-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
drivers/clocksource/tcb_clksrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 9de47d4..43f4d5c 100644
--- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c
@@ -384,7 +384,7 @@ static int __init tcb_clksrc_init(void)
printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK,
divided_rate / 1000000,
- ((divided_rate + 500000) % 1000000) / 1000);
+ ((divided_rate % 1000000) + 500) / 1000);
if (tc->tcb_config && tc->tcb_config->counter_width == 32) {
/* use apropriate function to read 32 bit counter */
Powered by blists - more mailing lists