Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/dumpstack: get rid of return_address again

With commit ef6000b4c670 ("Disable the __builtin_return_address()
warning globally after all)" the kernel does not warn at all again if
__builtin_return_address(n) is called with n > 0.

Besides the fact that this was a false warning on s390 anyway, due to
the always present backchain, we can now revert commit 5606330627ab
("s390/dumpstack: implement and use return_address()") again, to
simplify the code again.

After all I shouldn't have had return_address() implememted at all to
workaround this issue. So get rid of this again.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
dcddba96 4d062487

+1 -27
+1 -3
arch/s390/include/asm/ftrace.h
··· 12 12 13 13 #ifndef __ASSEMBLY__ 14 14 15 - unsigned long return_address(int depth); 16 - 17 - #define ftrace_return_address(n) return_address(n) 15 + #define ftrace_return_address(n) __builtin_return_address(n) 18 16 19 17 void _mcount(void); 20 18 void ftrace_caller(void);
-24
arch/s390/kernel/dumpstack.c
··· 87 87 } 88 88 EXPORT_SYMBOL_GPL(dump_trace); 89 89 90 - struct return_address_data { 91 - unsigned long address; 92 - int depth; 93 - }; 94 - 95 - static int __return_address(void *data, unsigned long address, int reliable) 96 - { 97 - struct return_address_data *rd = data; 98 - 99 - if (rd->depth--) 100 - return 0; 101 - rd->address = address; 102 - return 1; 103 - } 104 - 105 - unsigned long return_address(int depth) 106 - { 107 - struct return_address_data rd = { .depth = depth + 2 }; 108 - 109 - dump_trace(__return_address, &rd, NULL, current_stack_pointer()); 110 - return rd.address; 111 - } 112 - EXPORT_SYMBOL_GPL(return_address); 113 - 114 90 static int show_address(void *data, unsigned long address, int reliable) 115 91 { 116 92 if (reliable)