From patchwork Mon Mar 24 05:58:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 26916 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EBF11206A6 for ; Mon, 24 Mar 2014 05:58:49 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id i17sf12768801qcy.11 for ; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=iaCBSF4riVi5cj1YRS2uCD9G+BPDvsx/i912XS1He00=; b=Rxw6l8LzPn+16nt2uGshCEocxsTIjpb50n3Zg2MiqgMChYZnI/YVc621j+i1KuSHVR 22fF/aoNairE7yFyEOthf4WOuY5pUvGRgOUL7dmMM41FqoG2z4fjQS0Wri82Vcl3QiUr l7moMDPDnNmEp0WF6GGnxNc/Ri+JafcnZ+wRTkCPz6BubSiMWnJTf3wETCd4+VSr+fH7 s1NM/v7+h+JOo54SgjJTMbeVCpfRrVW6cTSiJq/1Qd9UYDrbeC6UBiOx7iP7EiJupJ+d a64a5mUyjlPbBBpXQ3FkxFM7qc7m8/zDd/cbmu/6E5CTlpEKgRHYW6lKajwluCVRUl+q n9MQ== X-Gm-Message-State: ALoCoQnZfP+6OgDSIh0P7tgWfNnlUZmC/La4jROoejkLR8MAoSmmQPw7VpevLEyyInQRTkqVkTCd X-Received: by 10.58.228.201 with SMTP id sk9mr14882512vec.35.1395640729722; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.200 with SMTP id k66ls1496261qge.85.gmail; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr49380559vcb.0.1395640729629; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) Received: from mail-vc0-x233.google.com (mail-vc0-x233.google.com [2607:f8b0:400c:c03::233]) by mx.google.com with ESMTPS id xx6si2777079vcb.187.2014.03.23.22.58.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Mar 2014 22:58:49 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::233; Received: by mail-vc0-f179.google.com with SMTP id ij19so5197157vcb.38 for ; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr49040564vcm.11.1395640729524; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp198765vck; Sun, 23 Mar 2014 22:58:49 -0700 (PDT) X-Received: by 10.68.189.5 with SMTP id ge5mr68847117pbc.42.1395640728367; Sun, 23 Mar 2014 22:58:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uh7si8394241pbc.125.2014.03.23.22.58.47; Sun, 23 Mar 2014 22:58:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbaCXF6l (ORCPT + 26 others); Mon, 24 Mar 2014 01:58:41 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:54142 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbaCXF6k (ORCPT ); Mon, 24 Mar 2014 01:58:40 -0400 Received: by mail-pb0-f49.google.com with SMTP id jt11so4923607pbb.8 for ; Sun, 23 Mar 2014 22:58:39 -0700 (PDT) X-Received: by 10.66.227.104 with SMTP id rz8mr69408468pac.74.1395640719811; Sun, 23 Mar 2014 22:58:39 -0700 (PDT) Received: from localhost.localdomain ([75.148.49.89]) by mx.google.com with ESMTPSA id qq5sm30906641pbb.24.2014.03.23.22.58.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Mar 2014 22:58:38 -0700 (PDT) From: behanw@converseincode.com To: rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com, linux@arm.linux.org.uk Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dwmw2@infradead.org, pageexec@freemail.hu, Behan Webster Subject: [PATCH v2] arm: LLVMLinux: use static inline in ARM ftrace.h Date: Sun, 23 Mar 2014 22:58:29 -0700 Message-Id: <1395640709-29042-1-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <20140311083107.6aa2bba4@gandalf.local.home> References: <20140311083107.6aa2bba4@gandalf.local.home> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: behanw@converseincode.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (no key for signature) header.i=@converseincode.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Behan Webster With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL version of return_address in return_address.c does the right thing. Signed-off-by: Behan Webster Reviewed-by: Mark Charlebois Acked-by: Steven Rostedt --- arch/arm/include/asm/ftrace.h | 2 +- arch/arm/kernel/return_address.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index f89515a..2bb8cac 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h @@ -45,7 +45,7 @@ void *return_address(unsigned int); #else -extern inline void *return_address(unsigned int level) +static inline void *return_address(unsigned int level) { return NULL; } diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c index fafedd8..f6aa84d 100644 --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c @@ -63,11 +63,6 @@ void *return_address(unsigned int level) #warning "TODO: return_address should use unwind tables" #endif -void *return_address(unsigned int level) -{ - return NULL; -} - #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */ EXPORT_SYMBOL_GPL(return_address);