From patchwork Fri Dec 1 12:22:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Izard X-Patchwork-Id: 10087001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AF1C76035E for ; Fri, 1 Dec 2017 12:23:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A59922A4EA for ; Fri, 1 Dec 2017 12:23:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A79A2A500; Fri, 1 Dec 2017 12:23:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 489DD2A4EA for ; Fri, 1 Dec 2017 12:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=Lukc3qfGGY9pTy0snLSSAFqsSGhDGdhnC4kOvDeXnaA=; b=GRM 5/KYXUsQsc8Un29Jhwc2EN8gCCU/h+RaTy2kxG+FIJ7sJL4XFW/fXVJWQAp0nJnYoA4jSQGlo4ohj dHDzig5NVpec+BJFxH0zfH4LMadVFwJgjw/pNey3IAAirp8tGgV57L8A3lJV/o8ZiwhRKztu66/+e Xg8HPxnnVJKFDbirIpk6fou8nqiWeZEEerZILNy1kFCGaCvnPBlthTVGFn2Exhzsn+iv0R/1Jp+CM tOX85AEF2hPs7IZYAwnyqL5G7fqY+YZJMWOkwqmZy80tIc5/E9XJeU9bebLlGgJl+eGhkL5k7LqRH PS6muCQS7DNf0UCM+piL+MKcjXV8/CQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKkLe-0007DQ-PH; Fri, 01 Dec 2017 12:23:18 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKkLb-00072b-9P for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2017 12:23:17 +0000 Received: by mail-wm0-x243.google.com with SMTP id f140so3068326wmd.2 for ; Fri, 01 Dec 2017 04:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0Nrg8pypp3anhY2/Dxq0FKRMWnfDg/tzbdJpPGqw9BM=; b=eAoPMJApJA/XTVxeb76J9wUqsWz4iBlJu/qIjbXZMjI3ydkeMOFnwif5Jvawc5ti3b M0IIzFp2N99UyEBRS2Tf+AGTCjsIVE561TFQtv2aTGbprMcsiaEEUUQaguo4WBQBEuk6 eJJIBsSkl7hzmhfR1UN1ZrbsWCXG4zcTmCuUxZQiuBrkVkurSzDF5nsPwfSHqnnRz3Rk 4gxWKRGPsK8/9I8ml95qrjQB5BnnEDp6D3ZHsg3IV4+hMoG07fZQoKSLr8hn39Qj8z+Q cwxfVtFWO2cVYIsMnmwxICw/ogGOnb4UN5ie6Gc6Oon6v5lDXEGeutEzRLKFD5NUGsUD KpvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0Nrg8pypp3anhY2/Dxq0FKRMWnfDg/tzbdJpPGqw9BM=; b=SQqIBgR9HVrJPfWbcn5jPL6VlmxwPV77hqyMPyA7QxM3fZivQNN4uEwYBxnevPt/zC MtkOVZDVI5K53Y2Q/ZrELpEnuOYetRwOKsVrzhwQfWbjnlLhji3QjVpux2YseCUvbVWz mYo3MvmLyFZldgeOKgi7Jq1PX2S0RUhWdRfNsFWNTx6Tvjmaei6iZDmZqVX9krf9/Ny7 pDbZTteyhAEUs6T8TILcVYBY2Xutm/pxwn1X4gT6VvJDHfChAnvt1NEMCJ8x9NdQQvMu gEmNB00xw4SiAiUG298WW5jrBJg6G2+4tz78B6OoZ8vPS9taZh8jH7XKUIyv0QBpVcx/ AJmw== X-Gm-Message-State: AJaThX4FNKdGzaD89xIC3X3oPEPxGU1jXCwnOGi2MyyJVCtzBb7Q1umQ 5JT2pz/oRVhJa2GEGw78/Oo= X-Google-Smtp-Source: AGs4zMZiozh0AbGK0APlrhYvOZaBUlrMG2wGtXQbXx2lBfh1qgMfHYby+vgOVOrxTy4G3VRE31wm5w== X-Received: by 10.28.109.5 with SMTP id i5mr882505wmc.20.1512130971909; Fri, 01 Dec 2017 04:22:51 -0800 (PST) Received: from localhost.localdomain (146.187.3.109.rev.sfr.net. [109.3.187.146]) by smtp.gmail.com with ESMTPSA id 2sm4166140wrg.49.2017.12.01.04.22.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2017 04:22:51 -0800 (PST) From: Romain Izard To: Nicolas Ferre 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171201_042315_528585_4567E123 X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Izard , Thomas Gleixner , Daniel Lezcano , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Nicolas Ferre --- 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 */