Message ID | 20190403141120.32754-13-alexandre.belloni@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B676917E1 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 3 Apr 2019 14:14:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 987EF28931 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 3 Apr 2019 14:14:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D212289FB; Wed, 3 Apr 2019 14:14: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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 44E16287A8 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 3 Apr 2019 14:14:11 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=BvkjDD/ihnoO7TJpLmDhAOjTWR14kRSFFNp5O91stTw=; b=ow5dB/nHTSHuUP hargAWddj64cIqe9MIVFnKSedp6VaRLhaBAD5OKtsq6oJ+T7BkDwCP3UsR7Or5wvdnRbO7ABqouNp 7X1f9azCtb3/2WYLBKu+gIsi7de/eJh5AyNz4ktUI+qIC8/JPH2tZPBv9sqDKeNvJU1i1xhJoKsDH quSqARLC0WiGgCtcybCGnt4YDpHDt/Ac/Z03NKj2dwgjzzeGqRUrPQNlcvEPqD62UstiDrNjA09j6 YJQITZ71ADhg5aWjKt+tWku6EhBJb7sl2KHgdNkEsB/fgrdAB1Utcv5RnchCLRPLMlD4IOr0e9bxB YmIxpZfh1+sP5ij1itlA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBgeS-0001qn-MZ; Wed, 03 Apr 2019 14:14:04 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBgcg-0007p5-4Y for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 14:12:44 +0000 X-Originating-IP: 109.213.83.19 Received: from localhost (alyon-652-1-60-19.w109-213.abo.wanadoo.fr [109.213.83.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id DE8712000F; Wed, 3 Apr 2019 14:12:09 +0000 (UTC) From: Alexandre Belloni <alexandre.belloni@bootlin.com> To: Daniel Lezcano <daniel.lezcano@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [PATCH 12/12] clocksource/drivers/timer-atmel-tcb: Use ARRAY_SIZE instead of hardcoded size Date: Wed, 3 Apr 2019 16:11:20 +0200 Message-Id: <20190403141120.32754-13-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190403141120.32754-1-alexandre.belloni@bootlin.com> References: <20190403141120.32754-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_071214_781840_53DDB2FD X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-pwm@vger.kernel.org, Alexandre Belloni <alexandre.belloni@bootlin.com>, Arnd Bergmann <arnd@arndb.de>, Alexander Dahl <ada@thorsis.com>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
clocksource: improve Atmel TCB timer driver
|
expand
|
diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c index 10350dffd157..eab5beadf2ca 100644 --- a/drivers/clocksource/timer-atmel-tcb.c +++ b/drivers/clocksource/timer-atmel-tcb.c @@ -396,7 +396,7 @@ static int __init tcb_clksrc_init(struct device_node *node) /* How fast will we be counting? Pick something over 5 MHz. */ rate = (u32) clk_get_rate(t0_clk); - for (i = 0; i < 5; i++) { + for (i = 0; i < ARRAY_SIZE(atmel_tc_divisors); i++) { unsigned divisor = atmel_tc_divisors[i]; unsigned tmp;
Use ARRAY_SIZE to replace the hardcoded size so we will never have a mismatch. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> --- drivers/clocksource/timer-atmel-tcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)