]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
sh: stacktrace: Remove stacktrace_ops.stack()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 18 Jun 2020 07:59:37 +0000 (09:59 +0200)
committerRich Felker <dalias@libc.org>
Sat, 15 Aug 2020 02:05:11 +0000 (22:05 -0400)
The SH implementation never called stacktrace_ops.stack().
Presumably this was copied from the x86 implementation.

Hence remove the method, and all implementations (most of them are
dummies).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/include/asm/stacktrace.h
arch/sh/kernel/dumpstack.c
arch/sh/kernel/perf_callchain.c
arch/sh/kernel/stacktrace.c
arch/sh/oprofile/backtrace.c

index 50c173c0b9f56f693cf48bb17346835422955f1b..4f98cdc64ec59b1c1c65fa01f2ea60906a0661b3 100644 (file)
@@ -12,8 +12,6 @@
 
 struct stacktrace_ops {
        void (*address)(void *data, unsigned long address, int reliable);
-       /* On negative return stop dumping */
-       int (*stack)(void *data, char *name);
 };
 
 void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
index 0a69588e343f7b98566499df18c09326f628f3fc..758a6c89e911bc15f8f5ac3b1f90bb7871fb4c0b 100644 (file)
@@ -107,12 +107,6 @@ stack_reader_dump(struct task_struct *task, struct pt_regs *regs,
        }
 }
 
-static int print_trace_stack(void *data, char *name)
-{
-       printk("%s <%s> ", (char *)data, name);
-       return 0;
-}
-
 /*
  * Print one address/symbol entries per line.
  */
@@ -123,7 +117,6 @@ static void print_trace_address(void *data, unsigned long addr, int reliable)
 }
 
 static const struct stacktrace_ops print_trace_ops = {
-       .stack = print_trace_stack,
        .address = print_trace_address,
 };
 
index 6281f2fdf9cac9065aac4fe5150023b8da23406d..c9d3aa18732d1d49afdcca6f931ca7d5a65bce4a 100644 (file)
 #include <asm/unwinder.h>
 #include <asm/ptrace.h>
 
-static int callchain_stack(void *data, char *name)
-{
-       return 0;
-}
-
 static void callchain_address(void *data, unsigned long addr, int reliable)
 {
        struct perf_callchain_entry_ctx *entry = data;
@@ -25,7 +20,6 @@ static void callchain_address(void *data, unsigned long addr, int reliable)
 }
 
 static const struct stacktrace_ops callchain_ops = {
-       .stack          = callchain_stack,
        .address        = callchain_address,
 };
 
index 2950b19ad077208114e13b8547d5f678649ea6fc..daf0b53ee066fa6d70aa63459f235d81ccd66100 100644 (file)
 #include <asm/ptrace.h>
 #include <asm/stacktrace.h>
 
-static int save_stack_stack(void *data, char *name)
-{
-       return 0;
-}
-
 /*
  * Save stack-backtrace addresses into a stack_trace buffer.
  */
@@ -40,7 +35,6 @@ static void save_stack_address(void *data, unsigned long addr, int reliable)
 }
 
 static const struct stacktrace_ops save_stack_ops = {
-       .stack = save_stack_stack,
        .address = save_stack_address,
 };
 
@@ -73,7 +67,6 @@ save_stack_address_nosched(void *data, unsigned long addr, int reliable)
 }
 
 static const struct stacktrace_ops save_stack_ops_nosched = {
-       .stack = save_stack_stack,
        .address = save_stack_address_nosched,
 };
 
index f1205f92631df3b9289fe935b63d5a0d9667666e..cc16cf86cd92fabeaade61f897fc62d26d2a288f 100644 (file)
 #include <asm/sections.h>
 #include <asm/stacktrace.h>
 
-static int backtrace_stack(void *data, char *name)
-{
-       /* Yes, we want all stacks */
-       return 0;
-}
-
 static void backtrace_address(void *data, unsigned long addr, int reliable)
 {
        unsigned int *depth = data;
@@ -34,7 +28,6 @@ static void backtrace_address(void *data, unsigned long addr, int reliable)
 }
 
 static struct stacktrace_ops backtrace_ops = {
-       .stack = backtrace_stack,
        .address = backtrace_address,
 };