From patchwork Tue May 27 09:04:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 4248131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 53C3BBF90B for ; Tue, 27 May 2014 09:07:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 814082017E for ; Tue, 27 May 2014 09:07:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC4292017D for ; Tue, 27 May 2014 09:07:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpDJz-0004xT-RY; Tue, 27 May 2014 09:05:23 +0000 Received: from smtp21.mail.ru ([94.100.179.250]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpDJv-0003q0-Q9 for linux-arm-kernel@lists.infradead.org; Tue, 27 May 2014 09:05:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=FQoPGFBqnABUc5yF44DCkq9Pi09EZeNnu7p6BeKlcu4=; b=IAuUvRngY8irAzmxAlt63uPBIqe5PvOzUbaG288cFxMUP4oGRulHKL362RIM4mg1chJess/rZaMfs4qEBFxSr4qxA2lxG8gEnqGxlYoZW/kBGSZ65jk3urzF4opI3hTeRzfvpFJ50axoBC2hUYnli8Uvds9i6cELjbkf/FojvLI=; Received: from [5.18.98.7] (port=47291 helo=shc.zet) by smtp21.mail.ru with esmtpa (envelope-from ) id 1WpDJX-0002qH-Pz; Tue, 27 May 2014 13:04:59 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: i.MX: Remove excess variable Date: Tue, 27 May 2014 13:04:47 +0400 Message-Id: <1401181487-25828-2-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1401181487-25828-1-git-send-email-shc_work@mail.ru> References: <1401181487-25828-1-git-send-email-shc_work@mail.ru> X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140527_020520_483875_7C77C980 X-CRM114-Status: GOOD ( 13.34 ) X-Spam-Score: -0.1 (/) Cc: Alexander Shiyan , Sascha Hauer , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Base address for driver is global, there are no need to use intermediate variable for it. Signed-off-by: Alexander Shiyan --- arch/arm/mach-imx/time.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 2d96051..1da2270 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -290,7 +290,7 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) return 0; } -static void __init _mxc_timer_init(void __iomem *base, int irq, +static void __init _mxc_timer_init(int irq, struct clk *clk_per, struct clk *clk_ipg) { uint32_t tctl_val; @@ -305,8 +305,6 @@ static void __init _mxc_timer_init(void __iomem *base, int irq, clk_prepare_enable(clk_per); - timer_base = base; - /* * Initialise to a known state (all timers off, and timing reset) */ @@ -334,21 +332,22 @@ void __init mxc_timer_init(void __iomem *base, int irq) struct clk *clk_per = clk_get_sys("imx-gpt.0", "per"); struct clk *clk_ipg = clk_get_sys("imx-gpt.0", "ipg"); - _mxc_timer_init(base, irq, clk_per, clk_ipg); + timer_base = base; + + _mxc_timer_init(irq, clk_per, clk_ipg); } void __init mxc_timer_init_dt(struct device_node *np) { struct clk *clk_per, *clk_ipg; - void __iomem *base; int irq; - base = of_iomap(np, 0); - WARN_ON(!base); + timer_base = of_iomap(np, 0); + WARN_ON(!timer_base); irq = irq_of_parse_and_map(np, 0); clk_per = of_clk_get_by_name(np, "per"); clk_ipg = of_clk_get_by_name(np, "ipg"); - _mxc_timer_init(base, irq, clk_per, clk_ipg); + _mxc_timer_init(irq, clk_per, clk_ipg); }