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: 123726 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2732452qgn; Mon, 8 Jan 2018 05:34:22 -0800 (PST) X-Google-Smtp-Source: ACJfBotrzWqF2gfs6M6ntQRgDy0gNWDGeTm3MQ80pyjBnOA5kASKEOwqLWN7lpIYsxegjIwe2xnT X-Received: by 10.101.81.7 with SMTP id f7mr9479441pgq.443.1515418462541; Mon, 08 Jan 2018 05:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515418462; cv=none; d=google.com; s=arc-20160816; b=PK8AgZ28sRl+iaGjpy7CwQ9mBPp4bE6MBRbpQ8QHJB949DLBrwdW1aIyt/l5S+GL12 JJduy7OYOIr2uqz5DRSfnXfY/d22UNG/4WsNEum18kqvH/Icj5DComqJtAlgUjaOPUSs A5Iyi6wfNQZJNYGNNwyz+gzDZoz1pITTsKjICpxdvyuRyVJmJuLaNNpmy3O94AlSvP/6 g9TiFt40qT4Bp9n9ghHpHtKBvZrIBTx8IHMo1i8OcTd9sH6r4IHWU04ooT+izn0LsxSO 1/4YL5sOK/fEYcuSfazVKJFSki3oEAVl7H6hC3vKvtf6q0EUUlvcto4BiCmyujajE7YI idpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=nS1WftPS2VO8reepCIodpX2vqtSPaUVOgmti5xMpgxg=; b=KhpjdtnFWRrnq9XRMGcXUe9qI+zR6qQ89Qe89VBxI8WkeboWoQ06AjMD2VknQ1YLNs hgM6kKci3ZHvl14bpCsgWFYIoBWhFujTI95id0imZJp7CXBFiYzOJ0fejG9u/o+ptB/I OOlJQ/L+4gKUrkSwXMdBrIX/2yhk82D/P/uhDW1XFOzt94ZEyzRi9xgwZu/9+inFdQ7A 2oZcSJAOUbyGxoBCMhQL6sGyFFy6XtURdOwWoxVm3bGAECs6g8IR8dCnTuY3zChOWNsZ p2G6AgsHBtxhib5xq1HfQwWhqrJ0u3I/jlX9bj/lV1Rx7bWo2SkADfCrDj0Vmd5ZTFsc oHjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NwbmV4bF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1si8389004pff.236.2018.01.08.05.34.22; Mon, 08 Jan 2018 05:34:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NwbmV4bF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933493AbeAHNeU (ORCPT + 28 others); Mon, 8 Jan 2018 08:34:20 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36406 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932692AbeAHN32 (ORCPT ); Mon, 8 Jan 2018 08:29:28 -0500 Received: by mail-wm0-f67.google.com with SMTP id b76so14338692wmg.1 for ; Mon, 08 Jan 2018 05:29:27 -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=j7IqG/lNOiNByrCHub7wXvpcPKQKnwmjPopG4DQ2wMY9NuqNnQa/iiK2q7pwfCgB36 /7eHta3thi6NIC8OE7dBCU2AdNVKTCuo/YTekgS8Zds6HMqzS1wKwoTj591rmmFSEiYU Rs5KIQUhl+auYSIydcLKQ5COxjJbXHlxHqpRFzxp3NF9QP/mlO/zjeaIvT18cSuWdrY2 CxXS9J82y9hIg1HH7vsx4TekYn1IG+zsIL6q3L9Q6ygDKcjnCqDXALcixBIZ7LxTkaW7 CpjSea5+sKYRh4XSD8VvcmFcqSt+RCg8xlV4seVK1tsmnyje7LspxTze0oZK/r1mE00d GVig== X-Gm-Message-State: AKGB3mKgy8XlrNmuykJdpdJBxWQXsPHCg0k8YH6NF4iI7wvC64FXT/Mr YrC8sEW7hhEeSKOx4qoFKSLwP9MEj90= 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 Cc: linux-kernel@vger.kernel.org, Romain Izard , Nicolas Ferre , linux-arm-kernel@lists.infradead.org (moderated list:ATMEL Timer Counter (TC) AND CLOCKSOURCE DRIVERS) 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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 */