From patchwork Mon Jan 8 13:28:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10149577 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 DD7C5602CA for ; Mon, 8 Jan 2018 13:32:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4478A28A38 for ; Mon, 8 Jan 2018 13:32:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4243928AD4; Mon, 8 Jan 2018 13:32:11 +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_SIGNED, DKIM_VALID,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 2A3FE28BE7 for ; Mon, 8 Jan 2018 13:31:18 +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:References: In-Reply-To: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:List-Owner; bh=WSvLwPqrv7rDtxNGQEiFajpjObTHvswtRSe+SKlJdKY=; b=h4xNf0mZfN+nD/S245Yk371/Fi XzZlerIvsBrqMeLgwlIn67ej0w2rduTu0JJnun3qYSoEylSUOqaWBnc9SA7qyrPhpPqW6mj/LiO4Z dzXrfI/QQ3YsyQxZ/0BcK7cd1lzbvan9R4MOWKEoy4ys4PhKLed7HM3++X1wH4n9JLUhWOAzNm7dI qJIxFD1v07ptrEc8dGqGGbQew9J1i++vMYX6Gl8qPzlfdb59Ljhc2WOUJOXUHvedZO8yudKTN6Bss dC+QIRmC5LqKjHyas6gPuWJ6XeyifLbHrF5ZXUpZ9/IG5VSdWmStEHgKkrPVWIomWvcFS73QBTY+Z xHK/uoqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYXWE-0004qK-DA; Mon, 08 Jan 2018 13:31:14 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYXUl-0003BW-AV for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2018 13:29:55 +0000 Received: by mail-wm0-x243.google.com with SMTP id 9so14082422wme.4 for ; Mon, 08 Jan 2018 05:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nS1WftPS2VO8reepCIodpX2vqtSPaUVOgmti5xMpgxg=; b=NwbmV4bFOFaA6ulIBkGsTKgNrafsukMyOwyDgM9slfvyNjSUwLJh0OA6+AaZAaQpAd 5Mwj4watYfHfyoTSwgA0OUzvHb9h1g2XdB9d7/LWgUG+kwUD2CrRHslDp7Ek172i1I9k xWHDVXq2Fre9DG2eVkaJD8yIviIakJ85HbRA0= 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:in-reply-to :references; bh=nS1WftPS2VO8reepCIodpX2vqtSPaUVOgmti5xMpgxg=; b=uTEUDQIEZ0QzqXI6WZu+TWePCTdP83vhKDIE1Vki9W/3hkt39Wgiz82JYQkpI/0J5E Wt5PfhJxtHIFUFuR12U8SBIUgAImMFcXIlCvVcgbYqwX8cfkT3lvi92129T8S1Msz7at QVEIHMu+sdLGZS49ysOceR+UTAASXzK9yz9SrSrFsLPCBwPXpDV5J8zL65HONDxx2v/I CNW6XG5q9bk4x5jOtgO0l/l2GBFaQnD/29Th9/w8VxHYHyB5OH47YEg4kGOZLSYrJ7Qh uvJFPR5M78y94aMq7eh5Co9J+n/fQiQq/adKNPY9rzYVu0GzcgO95lCZo7BQPxiiZR3k l2Fg== X-Gm-Message-State: AKGB3mJl1n6BvDylNzWhHP/nSlbunZCHqgAMaxLs98v6f/poma7k0pk9 cIvU16t93A3SUfLOHtbENCIpgw== X-Google-Smtp-Source: ACJfBosnBU//+cgjFSyQoDVQE5UPUVwuihWDVQpW7q5qeDFtg550fPLDwayQE6USNrGEd7nrgTa44w== X-Received: by 10.28.145.67 with SMTP id t64mr9282121wmd.83.1515418167165; Mon, 08 Jan 2018 05:29:27 -0800 (PST) Received: from mai.lan ([2001:41d0:fe90:b800:312a:53a5:1bef:6622]) by smtp.gmail.com with ESMTPSA id q196sm14354222wmb.22.2018.01.08.05.29.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 05:29:26 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Subject: [PATCH 04/20] clocksource/drivers/tcb_clksrc: Fix clock speed message Date: Mon, 8 Jan 2018 14:28:43 +0100 Message-Id: <1515418139-23276-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> References: <1bbaef2e-4080-3f54-7db3-a8989acfd691@free.fr> <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_052943_771053_4D7A1F0B X-CRM114-Status: GOOD ( 11.64 ) 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 , linux-kernel@vger.kernel.org, "moderated list:ATMEL Timer Counter TC AND CLOCKSOURCE DRIVERS" 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 From: Romain Izard 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 Signed-off-by: Daniel Lezcano --- 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 */