1 From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
 
   2 From: Behan Webster <behanw@converseincode.com>
 
   3 Date: Wed, 24 Sep 2014 01:06:46 +0100
 
   4 Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
 
   6 With compilers which follow the C99 standard (like modern versions of gcc and
 
   7 clang), "extern inline" does the wrong thing (emits code for an externally
 
   8 linkable version of the inline function). In this case using static inline
 
   9 and removing the NULL version of return_address in return_address.c does
 
  12 Signed-off-by: Behan Webster <behanw@converseincode.com>
 
  13 Reviewed-by: Mark Charlebois <charlebm@gmail.com>
 
  14 Acked-by: Steven Rostedt <rostedt@goodmis.org>
 
  15 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
 
  17 diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
 
  18 index 39eb16b..bfe2a2f 100644
 
  19 --- a/arch/arm/include/asm/ftrace.h
 
  20 +++ b/arch/arm/include/asm/ftrace.h
 
  21 @@ -45,7 +45,7 @@ void *return_address(unsigned int);
 
  25 -extern inline void *return_address(unsigned int level)
 
  26 +static inline void *return_address(unsigned int level)
 
  30 diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
 
  31 index fafedd8..f6aa84d 100644
 
  32 --- a/arch/arm/kernel/return_address.c
 
  33 +++ b/arch/arm/kernel/return_address.c
 
  34 @@ -63,11 +63,6 @@ void *return_address(unsigned int level)
 
  35  #warning "TODO: return_address should use unwind tables"
 
  38 -void *return_address(unsigned int level)
 
  43  #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
 
  45  EXPORT_SYMBOL_GPL(return_address);