From patchwork Wed Nov 28 10:21:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: hvaibhav@ti.com X-Patchwork-Id: 202428 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1CD832C008F for ; Wed, 28 Nov 2012 21:25:58 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TdemG-0003eq-En; Wed, 28 Nov 2012 10:22:00 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TdemC-0003eH-7q for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2012 10:21:57 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id qASALmqn013710; Wed, 28 Nov 2012 04:21:49 -0600 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qASALkK4023479; Wed, 28 Nov 2012 15:51:46 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Wed, 28 Nov 2012 15:51:45 +0530 Received: from [172.24.190.42] (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id qASALgfj009728; Wed, 28 Nov 2012 15:51:42 +0530 Message-ID: <50B5E5B6.9080107@ti.com> Date: Wed, 28 Nov 2012 15:51:42 +0530 From: Vaibhav Hiremath User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Jon Hunter Subject: Re: [PATCH 3/3] ARM: AM335x: Fix warning in timer.c References: <1354068915-3378-1-git-send-email-jon-hunter@ti.com> <1354068915-3378-4-git-send-email-jon-hunter@ti.com> In-Reply-To: <1354068915-3378-4-git-send-email-jon-hunter@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121128_052156_414596_5AE21A2A X-CRM114-Status: GOOD ( 19.53 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -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: Tony Lindgren , linux-omap , Igor Grinberg , linux-arm X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On 11/28/2012 7:45 AM, Jon Hunter wrote: > When compiling the kernel with configuration options ... > > # CONFIG_ARCH_OMAP2 is not set > # CONFIG_ARCH_OMAP3 is not set > # CONFIG_ARCH_OMAP4 is not set > # CONFIG_SOC_OMAP5 is not set > CONFIG_SOC_AM33XX=y > > ... the following build warning is seen. > > CC arch/arm/mach-omap2/timer.o > arch/arm/mach-omap2/timer.c:395:19: warning: ‘omap2_sync32k_clocksource_init’ > defined but not used [-Wunused-function] > > This issue was introduced by commit 6f80b3b (ARM: OMAP2+: timer: remove > CONFIG_OMAP_32K_TIMER) where the omap2_sync32k_clocksource_init() is no > longer referenced by the timer initialisation function for the AM335x > device as it has no 32k-sync timer. > > Fix this by only including the omap2_sync32k_clocksource_init() function > if either OMAP2, OMAP3, OMAP4 or OMAP5 devices are enabled. > > Cc: Igor Grinberg > > Signed-off-by: Jon Hunter > --- > arch/arm/mach-omap2/timer.c | 3 +++ > 1 file changed, 3 insertions(+) > Jon, I applied all these patches and it fixes build warning and also I have tested it on Bone platform without any issues. I also ran parse on this and saw further warning, CHECK arch/arm/mach-omap2/timer.c arch/arm/mach-omap2/timer.c:193:13: warning: symbol 'omap_dmtimer_init' was not declared. Should it be static? arch/arm/mach-omap2/timer.c:213:12: warning: symbol 'omap_dm_timer_get_errata' was not declared. Should it be static? Below patch fixes that too, feel free to merge it into your's @@ -210,7 +210,7 @@ void __init omap_dmtimer_init(void) * * Get the timer errata flags that are specific to the OMAP device being used. */ -u32 __init omap_dm_timer_get_errata(void) +static u32 __init omap_dm_timer_get_errata(void) { if (cpu_is_omap24xx()) return 0; Thanks, Vaibhav diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 085c7e7..1d1cfec 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -190,7 +190,7 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match, * kernel registering these devices remove them dynamically from the device * tree on boot. */ -void __init omap_dmtimer_init(void) +static void __init omap_dmtimer_init(void) { struct device_node *np;