From patchwork Thu Jul 10 05:32:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 33372 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 85887203F4 for ; Thu, 10 Jul 2014 05:33:23 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id lx4sf34718815iec.1 for ; Wed, 09 Jul 2014 22:33:23 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=uSxKaiChuoNqKQRHDquGGzlnUNqRi+QYDHRUVHi6x2w=; b=IS0uNWIJdAepKnEYWM2ip50Xpc1kmwys3kUSiT6cvebfqpVlXdiv2lUlWzAcjH/wT7 5CdjJICqQ/rMUMWTG+GpaGKcYLOaGexB0bbGcOA3o2wQLK+0uLgUfqcrMPZhGvcyAtGJ G8csVkbHrWFJbKI44D4DQ1KbquUOSS/VTXyXuL6eKpnsdXAp2+5jwDaHqCPqJS0FpO1f uWxMCRGvv6waG/1UMIlY7NzB8WL0ZMTfotiC0QDsvA9AcX/Qca3niLctRHXkujY9GyYS VORGtlKyWTGEThh+rLyga72n7lwDtBCq31LkZcmgKjzRphWYrgBopv4+COBa38gg3ucY T6dA== X-Gm-Message-State: ALoCoQmQnhPqRT0HGgtz3WF6MfAu6oPP6yCsT0+AnR2GiJ6eoU/hhDHoMzcafrf2C/x2wdkm0h7s X-Received: by 10.50.78.69 with SMTP id z5mr6574639igw.2.1404970403002; Wed, 09 Jul 2014 22:33:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.107 with SMTP id f98ls2780264qge.65.gmail; Wed, 09 Jul 2014 22:33:22 -0700 (PDT) X-Received: by 10.58.234.103 with SMTP id ud7mr44224872vec.24.1404970402901; Wed, 09 Jul 2014 22:33:22 -0700 (PDT) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [2607:f8b0:400c:c03::229]) by mx.google.com with ESMTPS id wz8si22503812vdb.13.2014.07.09.22.33.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jul 2014 22:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::229 as permitted sender) client-ip=2607:f8b0:400c:c03::229; Received: by mail-vc0-f169.google.com with SMTP id la4so9556331vcb.14 for ; Wed, 09 Jul 2014 22:33:22 -0700 (PDT) X-Received: by 10.58.228.74 with SMTP id sg10mr42449208vec.6.1404970402820; Wed, 09 Jul 2014 22:33:22 -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.221.37.5 with SMTP id tc5csp105281vcb; Wed, 9 Jul 2014 22:33:22 -0700 (PDT) X-Received: by 10.70.34.228 with SMTP id c4mr15065101pdj.76.1404970401986; Wed, 09 Jul 2014 22:33:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xx3si47698544pbc.124.2014.07.09.22.33.21; Wed, 09 Jul 2014 22:33:21 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751019AbaGJFdI (ORCPT + 28 others); Thu, 10 Jul 2014 01:33:08 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:38921 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbaGJFdF (ORCPT ); Thu, 10 Jul 2014 01:33:05 -0400 Received: by mail-pd0-f170.google.com with SMTP id z10so10256159pdj.1 for ; Wed, 09 Jul 2014 22:33:05 -0700 (PDT) X-Received: by 10.68.110.3 with SMTP id hw3mr123365pbb.144.1404970385224; Wed, 09 Jul 2014 22:33:05 -0700 (PDT) Received: from galdor.websterwood.com (S0106dc9fdb80cffd.gv.shawcable.net. [96.50.97.138]) by mx.google.com with ESMTPSA id gg3sm60639276pbc.34.2014.07.09.22.33.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Jul 2014 22:33:04 -0700 (PDT) From: behanw@converseincode.com To: linux@arm.linux.org.uk, mingo@redhat.com, rostedt@goodmis.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dwmw2@infradead.org, Behan Webster Subject: [PATCH] arm: LLVMLinux: use static inline in ARM ftrace.h Date: Wed, 9 Jul 2014 22:32:52 -0700 Message-Id: <1404970372-5026-1-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.9.1 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::229 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ 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 CC: linux@arm.linux.org.uk --- 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 39eb16b..bfe2a2f 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);