From patchwork Wed Nov 28 02:15:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 1813581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 9F7C23FCF6 for ; Wed, 28 Nov 2012 02:20:34 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TdXBd-00057R-8w; Wed, 28 Nov 2012 02:15:41 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TdXBO-00055z-Vg for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2012 02:15:28 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAS2FOtX019418; Tue, 27 Nov 2012 20:15:25 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAS2FOKj018292; Tue, 27 Nov 2012 20:15:24 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 27 Nov 2012 20:15:24 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAS2FONd024575; Tue, 27 Nov 2012 20:15:24 -0600 Received: from localhost (h114-231.vpn.ti.com [172.24.114.231]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id qAS2FMw05046; Tue, 27 Nov 2012 20:15:22 -0600 (CST) From: Jon Hunter To: Tony Lindgren Subject: [PATCH 1/3] ARM: OMAP2+: Fix realtime_counter_init warning in timer.c Date: Tue, 27 Nov 2012 20:15:13 -0600 Message-ID: <1354068915-3378-2-git-send-email-jon-hunter@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1354068915-3378-1-git-send-email-jon-hunter@ti.com> References: <1354068915-3378-1-git-send-email-jon-hunter@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121127_211527_247001_4349AEC7 X-CRM114-Status: GOOD ( 14.12 ) X-Spam-Score: -6.1 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.153 listed in list.dnswl.org] 1.5 URIBL_RHS_DOB Contains an URI of a new domain (Day Old Bread) [URIs: atomide.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-omap , Santosh Shilimkar , Jon Hunter , linux-arm X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org In commit fa6d79d (ARM: OMAP: Add initialisation for the real-time counter), the function realtime_counter_init() was added. However, if the kernel configuration option CONFIG_SOC_OMAP5 is not selected then the following compiler warning is observed. CC arch/arm/mach-omap2/timer.o arch/arm/mach-omap2/timer.c:489:20: warning: ‘realtime_counter_init’ defined but not used [-Wunused-function] Commit fa6d79d also introduced the kernel configuration option CONFIG_SOC_HAS_REALTIME_COUNTER. If this option is not selected then the a stub function for realtime_counter_init() is defined. The option CONFIG_SOC_HAS_REALTIME_COUNTER and stub function are not really needed because ... 1. For non-OMAP5 devices, there is no realtime counter and so realtime_counter_init() function is not used. 2. For OMAP5 devices, CONFIG_SOC_HAS_REALTIME_COUNTER is always selected and cannot be disabled, so the stub function for realtime_counter_init() is never used. Fix this warning by removing the kernel configuration option CONFIG_SOC_HAS_REALTIME_COUNTER and stub function, and only include the function realtime_counter_init() if CONFIG_SOC_OMAP5 is selected. Cc: Santosh Shilimkar Reported-by: Tony Lindgren Signed-off-by: Jon Hunter --- arch/arm/mach-omap2/Kconfig | 4 ---- arch/arm/mach-omap2/timer.c | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 813c267..ea88b7d 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -24,9 +24,6 @@ config ARCH_OMAP2PLUS_TYPICAL config SOC_HAS_OMAP2_SDRC bool "OMAP2 SDRAM Controller support" -config SOC_HAS_REALTIME_COUNTER - bool "Real time free running counter" - config ARCH_OMAP2 bool "TI OMAP2" depends on ARCH_OMAP2PLUS @@ -79,7 +76,6 @@ config SOC_OMAP5 select ARM_GIC select CPU_V7 select HAVE_SMP - select SOC_HAS_REALTIME_COUNTER select COMMON_CLK comment "OMAP Core Type" diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index b9cff72..a9f99e3 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -476,7 +476,7 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id, gptimer_id, clksrc.rate); } -#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER +#ifdef CONFIG_SOC_OMAP5 /* * The realtime counter also called master counter, is a free-running * counter, which is related to real time. It produces the count used @@ -549,10 +549,7 @@ static void __init realtime_counter_init(void) iounmap(base); } -#else -static inline void __init realtime_counter_init(void) -{} -#endif +#endif /* CONFIG_SOC_OMAP5 */ #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ clksrc_nr, clksrc_src) \