From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752511AbdLAMWy (ORCPT ); Fri, 1 Dec 2017 07:22:54 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38915 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbdLAMWx (ORCPT ); Fri, 1 Dec 2017 07:22:53 -0500 X-Google-Smtp-Source: AGs4zMZiozh0AbGK0APlrhYvOZaBUlrMG2wGtXQbXx2lBfh1qgMfHYby+vgOVOrxTy4G3VRE31wm5w== From: Romain Izard To: Nicolas Ferre Cc: Daniel Lezcano , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Romain Izard Subject: [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message Date: Fri, 1 Dec 2017 13:22:33 +0100 Message-Id: <20171201122233.21828-1-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: rebase over v4.15-rc1 There is no specified maintainer for this file, only supporters. Nicolas, could you pick this through the at91 tree as the TCB block is an AT91 peripheral ? 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 9de47d4d2d9e..43f4d5c4d6fa 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 */ -- 2.14.1