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: 12085 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 925DE23F6D for ; Tue, 9 Oct 2012 20:14:22 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 40FB1A18878 for ; Tue, 9 Oct 2012 20:14:22 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so12072772iej.11 for ; Tue, 09 Oct 2012 13:14:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=25JJYIiC/ETYTpwXwDKiHPC6TaycJJxmv4XuRoUI/hw=; b=f5sMTUkBkKz4aK3SqFng4Oks3KYE1gkhf+pILcftNLgy4tKREldvkYdLRcKuX4z7bs QoGXZaOf7fMaWM8Q/Bpt63D7MeH1XNuqqSwEEzOzoy2q9KG5BANsVmLnnbNnNN3NOIfl 3afYkz1bFbW9zjw4dOIExqbXXw0RpOcRJ1OA3GycYZulWhR4qVQ2AfcdadQKGXd1UUkd mn6wviOhra6mXIaSY7j8lugmXK2cnP1kOt4bmGHttwrUOntOi/t89GlN7GkqpoGsbF4S K57AZfDzX0ZMDukDSQxHX64EF6znkhrPttCaOnY5oKY1MpTUIOsQevtjI6s50Cnm9AM9 Jq2Q== Received: by 10.50.157.201 with SMTP id wo9mr2961990igb.57.1349813661928; Tue, 09 Oct 2012 13:14:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp113913igt; Tue, 9 Oct 2012 13:14:21 -0700 (PDT) Received: by 10.180.87.74 with SMTP id v10mr7101096wiz.21.1349813660554; Tue, 09 Oct 2012 13:14:20 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.187]) by mx.google.com with ESMTPS id s10si27669167wic.11.2012.10.09.13.14.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 13:14:20 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.187; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Russell King , Mike Turquette , Kukjin Kim , Ben Dooks 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-Gm-Message-State: ALoCoQn3/k1g913InGPf9xyZxu5mdpJbl2/KP3KQf++rur3ZWKmYrF7ERq94+TrD/cYE2tKV3hit 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--) {