From patchwork Wed Oct 17 13:28:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 1605991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id A2565DFABE for ; Wed, 17 Oct 2012 13:30:41 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TOTg6-0000rH-Ql; Wed, 17 Oct 2012 13:28:54 +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 1TOTg2-0000pn-SN for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2012 13:28:51 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9HDSlHp011767; Wed, 17 Oct 2012 08:28:48 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9HDSiJY009762; Wed, 17 Oct 2012 18:58:45 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Wed, 17 Oct 2012 18:58:44 +0530 Received: from a0131933lt.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9HDSfun027782; Wed, 17 Oct 2012 18:58:42 +0530 From: Lokesh Vutla To: Subject: [PATCH] drivers: bus: omap_interconnect: Fix rand-config build warning Date: Wed, 17 Oct 2012 18:58:39 +0530 Message-ID: <1350480519-1890-1-git-send-email-lokeshvutla@ti.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.3 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.3 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] -0.0 SPF_PASS SPF: sender matches SPF record -0.4 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@atomide.com, lokeshvutla@ti.com, santosh.shilimkar@ti.com, linux-arm-kernel@lists.infradead.org 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 When building omap_l3_noc/smx drivers as modules, the following warning appears: CC [M] drivers/bus/omap_l3_smx.o drivers/bus/omap_l3_smx.c:291: warning: data definition has no type or storage class drivers/bus/omap_l3_smx.c:291: warning: type defaults to 'int' in declaration of 'postcore_initcall_sync' drivers/bus/omap_l3_smx.c:291: warning: parameter names (without types) in function declaration drivers/bus/omap_l3_smx.c:287: warning: 'omap3_l3_init' defined but not used CC [M] drivers/bus/omap_l3_noc.o drivers/bus/omap_l3_noc.c:260: warning: data definition has no type or storage class drivers/bus/omap_l3_noc.c:260: warning: type defaults to 'int' in declaration of 'arch_initcall_sync' drivers/bus/omap_l3_noc.c:260: warning: parameter names (without types) in function declaration drivers/bus/omap_l3_noc.c:256: warning: 'omap4_l3_init' defined but not used Adding module_init() and macros in omap_l3_noc/smx drivers when building as modules to remove the above warning. Reported-by: Tony Lindgren Signed-off-by: Lokesh Vutla Acked-by: Santosh Shilimkar --- drivers/bus/omap_l3_noc.c | 9 +++++++++ drivers/bus/omap_l3_smx.c | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index d15225f..8222a33 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c @@ -257,10 +257,19 @@ static int __init omap4_l3_init(void) { return platform_driver_register(&omap4_l3_driver); } +#ifndef CONFIG_OMAP_INTERCONNECT_MODULE postcore_initcall_sync(omap4_l3_init); +#else +module_init(omap4_l3_init); +#endif static void __exit omap4_l3_exit(void) { platform_driver_unregister(&omap4_l3_driver); } module_exit(omap4_l3_exit); + +MODULE_ALIAS("platform: omap_l3_noc"); +MODULE_AUTHOR("Texas Instruments Inc."); +MODULE_DESCRIPTION("OMAP4XXX L3 Interconnect Driver"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c index acc2164..00f712d 100644 --- a/drivers/bus/omap_l3_smx.c +++ b/drivers/bus/omap_l3_smx.c @@ -22,6 +22,7 @@ * USA */ +#include #include #include #include @@ -288,10 +289,19 @@ static int __init omap3_l3_init(void) { return platform_driver_probe(&omap3_l3_driver, omap3_l3_probe); } +#ifndef CONFIG_OMAP_INTERCONNECT_MODULE postcore_initcall_sync(omap3_l3_init); +#else +module_init(omap3_l3_init); +#endif static void __exit omap3_l3_exit(void) { platform_driver_unregister(&omap3_l3_driver); } module_exit(omap3_l3_exit); + +MODULE_ALIAS("platform: omap_l3_smx"); +MODULE_AUTHOR("Texas Instruments Inc."); +MODULE_DESCRIPTION("OMAP3XXX L3 Interconnect Driver"); +MODULE_LICENSE("GPL v2");