From patchwork Tue Oct 9 20:13:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1571501 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 761813FE80 for ; Tue, 9 Oct 2012 20:18:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TLgDp-0000ns-Tn; Tue, 09 Oct 2012 20:16:10 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TLgC7-0008QR-Ek for linux-arm-kernel@lists.infradead.org; Tue, 09 Oct 2012 20:14:24 +0000 Received: from klappe2.lan (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0MITed-1TNbrW0Tlv-00490h; Tue, 09 Oct 2012 22:14:05 +0200 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH v2 5/8] clk: don't mark clkdev_add_table as init Date: Tue, 9 Oct 2012 22:13:55 +0200 Message-Id: <1349813638-4617-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349813638-4617-1-git-send-email-arnd@arndb.de> References: <1349813638-4617-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:C6OCCUA0JvCAokhtTYUv/vSDeZTXYIrHY3xFn0csBQl wuQ/zbo5/FL0HPFwz+5jW+1yIV2sCXh8RRDbtUIz4EpsT/DI5A EBfQjoma5DyTuGinbteYWOA7eJW6Jus6+q4VQ3WMajHnYSFmsh OG2C7sutb/sjvz/nShNwsmDZVxp9k6/9tInVYO8RO3XobckWch R5FNI3BmOC3avCuQJ4RvxCVwJPPN3F5jisJvfsfoxAq/SNFrkS 1wYa+poqJgVRGRTD8ajsLR8yWhb9R0btWmeMUSD8uo7SC3cvTy o3tg5bxaCDt11KXmaVvLJnDR4j3z82322KbhdDOqx57ookKkJ9 t4S0/E70jnVPxB+yoNt9ojn0kNF2VAqpeMAUHOqH6 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kukjin Kim , Russell King , Arnd Bergmann , linux-kernel@vger.kernel.org, Ben Dooks , Mike Turquette , 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org s3c2440_clk_add is a subsys_interface method and calls clkdev_add_table, which means we might be calling it after the __init section is discarded. Without this patch, building mini2440_defconfig results in: WARNING: vmlinux.o(.text+0x9848): Section mismatch in reference from the function s3c2440_clk_add() to the function .init.text:clkdev_add_table() The function s3c2440_clk_add() references the function __init clkdev_add_table(). This is often because s3c2440_clk_add lacks a __init annotation or the annotation of clkdev_add_table is wrong. Signed-off-by: Arnd Bergmann Cc: Russell King Cc: Mike Turquette Cc: Kukjin Kim Cc: Ben Dooks --- drivers/clk/clkdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 442a313..6956857 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -179,7 +179,7 @@ void clkdev_add(struct clk_lookup *cl) } EXPORT_SYMBOL(clkdev_add); -void __init clkdev_add_table(struct clk_lookup *cl, size_t num) +void clkdev_add_table(struct clk_lookup *cl, size_t num) { mutex_lock(&clocks_mutex); while (num--) {