Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754205AbeAHRbl (ORCPT + 1 other); Mon, 8 Jan 2018 12:31:41 -0500 Received: from terminus.zytor.com ([65.50.211.136]:57601 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754169AbeAHRbc (ORCPT ); Mon, 8 Jan 2018 12:31:32 -0500 Date: Mon, 8 Jan 2018 09:27:18 -0800 From: tip-bot for Romain Izard Message-ID: Cc: mingo@kernel.org, romain.izard.pro@gmail.com, daniel.lezcano@linaro.org, torvalds@linux-foundation.org, nicolas.ferre@microchip.com, hpa@zytor.com, peterz@infradead.org, tglx@linutronix.de, linux-kernel@vger.kernel.org Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, nicolas.ferre@microchip.com, hpa@zytor.com, romain.izard.pro@gmail.com, daniel.lezcano@linaro.org, torvalds@linux-foundation.org, mingo@kernel.org In-Reply-To: <1515418139-23276-4-git-send-email-daniel.lezcano@linaro.org> References: <1515418139-23276-4-git-send-email-daniel.lezcano@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] clocksource/drivers/tcb_clksrc: Fix clock speed message Git-Commit-ID: 542f824607a6968ea443208ccfef3b7daf503559 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Commit-ID: 542f824607a6968ea443208ccfef3b7daf503559 Gitweb: https://git.kernel.org/tip/542f824607a6968ea443208ccfef3b7daf503559 Author: Romain Izard AuthorDate: Mon, 8 Jan 2018 14:28:43 +0100 Committer: Ingo Molnar 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 Signed-off-by: Daniel Lezcano Acked-by: Nicolas Ferre Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1515418139-23276-4-git-send-email-daniel.lezcano@linaro.org Signed-off-by: Ingo Molnar --- 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 */