]> code.ossystems Code Review - meta-freescale.git/blob
47f13c71d3a2dd3948194209c1c5081e83067537
[meta-freescale.git] /
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
5
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
10 the right thing.
11
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>
16
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);
22  
23  #else
24  
25 -extern inline void *return_address(unsigned int level)
26 +static inline void *return_address(unsigned int level)
27  {
28         return NULL;
29  }
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"
36  #endif
37  
38 -void *return_address(unsigned int level)
39 -{
40 -       return NULL;
41 -}
42 -
43  #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
44  
45  EXPORT_SYMBOL_GPL(return_address);
46 -- 
47 cgit v0.10.2
48