From patchwork Mon Nov 26 19:20:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Russ Dill X-Patchwork-Id: 1806271 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 19D7F3FC54 for ; Mon, 26 Nov 2012 19:28:46 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Td4EG-0001Dt-Dq; Mon, 26 Nov 2012 19:20:31 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Td4E3-00018S-E7 for linux-arm-kernel@lists.infradead.org; Mon, 26 Nov 2012 19:20:20 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi1so4780560pad.36 for ; Mon, 26 Nov 2012 11:20:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=BgLE0dgM3bP7JMCM/vnp/Tt2qizcekBUYVZyQkllddg=; b=pDj5dZ+LvNN0JbTIaSNKILBQbPbsF7IJgu1bca1r/2DZ2tD06xTCC1il2jmDOlsx+3 y+JD/kR+iYoR615nEDFcHwKwcmvFWnprHd9joG8QSJcGZq/ipiezoV3y415JlRLaqEkx rZ5djRY4CVDnzAiADbRAfeDzjXX43/73Iu+6GVMkFnxG9IUaAeuIKBuTejg8Opfkk2nB fVFEbhSs6hY5dFQ1ou7fEc5vq/+EuFChSWzqpSZ1pLXBQrWBx9EFZOr8onbSaW2DftqI jkLEaZ29djakUXwNZV+CQr04d9hK+apjFJz1v3RdAhHAppzCfoHPQTCym8687XZHlRUB HByg== Received: by 10.68.209.170 with SMTP id mn10mr40743004pbc.11.1353957612606; Mon, 26 Nov 2012 11:20:12 -0800 (PST) Received: from localhost (pool-74-100-57-85.lsanca.fios.verizon.net. [74.100.57.85]) by mx.google.com with ESMTPS id mt15sm9197774pbc.49.2012.11.26.11.20.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 11:20:11 -0800 (PST) From: Russ Dill To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Don't mark shared helper functions as inline Date: Mon, 26 Nov 2012 11:20:09 -0800 Message-Id: <1353957609-1295-1-git-send-email-Russ.Dill@ti.com> X-Mailer: git-send-email 1.8.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121126_142015_825065_EBB0E7E6 X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (russ.dill[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Russ Dill , mturquette@ti.com 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 The helper functions that access the opaque struct clk should not be marked inline since they are contained in clk.c, but expected to be used by other compilation units. This causes compile errors under gcc-4.7 In file included from arch/arm/mach-omap2/clockdomain.c:25:0: arch/arm/mach-omap2/clockdomain.c: In function ‘clkdm_clk_disable’: include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ‘__clk_get_enable_count’: function body not available arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Signed-off-by: Russ Dill --- drivers/clk/clk.c | 14 +++++++------- include/linux/clk-provider.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 56e4495e..ed01746 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -249,32 +249,32 @@ late_initcall(clk_disable_unused); /*** helper functions ***/ -inline const char *__clk_get_name(struct clk *clk) +const char *__clk_get_name(struct clk *clk) { return !clk ? NULL : clk->name; } -inline struct clk_hw *__clk_get_hw(struct clk *clk) +struct clk_hw *__clk_get_hw(struct clk *clk) { return !clk ? NULL : clk->hw; } -inline u8 __clk_get_num_parents(struct clk *clk) +u8 __clk_get_num_parents(struct clk *clk) { return !clk ? -EINVAL : clk->num_parents; } -inline struct clk *__clk_get_parent(struct clk *clk) +struct clk *__clk_get_parent(struct clk *clk) { return !clk ? NULL : clk->parent; } -inline int __clk_get_enable_count(struct clk *clk) +int __clk_get_enable_count(struct clk *clk) { return !clk ? -EINVAL : clk->enable_count; } -inline int __clk_get_prepare_count(struct clk *clk) +int __clk_get_prepare_count(struct clk *clk) { return !clk ? -EINVAL : clk->prepare_count; } @@ -300,7 +300,7 @@ out: return ret; } -inline unsigned long __clk_get_flags(struct clk *clk) +unsigned long __clk_get_flags(struct clk *clk) { return !clk ? -EINVAL : clk->flags; } diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index c127315..f9f5e9e 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -335,8 +335,8 @@ const char *__clk_get_name(struct clk *clk); struct clk_hw *__clk_get_hw(struct clk *clk); u8 __clk_get_num_parents(struct clk *clk); struct clk *__clk_get_parent(struct clk *clk); -inline int __clk_get_enable_count(struct clk *clk); -inline int __clk_get_prepare_count(struct clk *clk); +int __clk_get_enable_count(struct clk *clk); +int __clk_get_prepare_count(struct clk *clk); unsigned long __clk_get_rate(struct clk *clk); unsigned long __clk_get_flags(struct clk *clk); int __clk_is_enabled(struct clk *clk);