hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/sh/kernel/stacktrace.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * arch/sh/kernel/stacktrace.c
34 *
45 * Stack trace management functions
56 *
67 * Copyright (C) 2006 - 2008 Paul Mundt
7
- *
8
- * This file is subject to the terms and conditions of the GNU General Public
9
- * License. See the file "COPYING" in the main directory of this archive
10
- * for more details.
118 */
129 #include <linux/sched.h>
1310 #include <linux/sched/debug.h>
....@@ -17,11 +14,6 @@
1714 #include <asm/unwinder.h>
1815 #include <asm/ptrace.h>
1916 #include <asm/stacktrace.h>
20
-
21
-static int save_stack_stack(void *data, char *name)
22
-{
23
- return 0;
24
-}
2517
2618 /*
2719 * Save stack-backtrace addresses into a stack_trace buffer.
....@@ -43,7 +35,6 @@
4335 }
4436
4537 static const struct stacktrace_ops save_stack_ops = {
46
- .stack = save_stack_stack,
4738 .address = save_stack_address,
4839 };
4940
....@@ -52,8 +43,6 @@
5243 unsigned long *sp = (unsigned long *)current_stack_pointer;
5344
5445 unwind_stack(current, NULL, sp, &save_stack_ops, trace);
55
- if (trace->nr_entries < trace->max_entries)
56
- trace->entries[trace->nr_entries++] = ULONG_MAX;
5746 }
5847 EXPORT_SYMBOL_GPL(save_stack_trace);
5948
....@@ -78,7 +67,6 @@
7867 }
7968
8069 static const struct stacktrace_ops save_stack_ops_nosched = {
81
- .stack = save_stack_stack,
8270 .address = save_stack_address_nosched,
8371 };
8472
....@@ -87,7 +75,5 @@
8775 unsigned long *sp = (unsigned long *)tsk->thread.sp;
8876
8977 unwind_stack(current, NULL, sp, &save_stack_ops_nosched, trace);
90
- if (trace->nr_entries < trace->max_entries)
91
- trace->entries[trace->nr_entries++] = ULONG_MAX;
9278 }
9379 EXPORT_SYMBOL_GPL(save_stack_trace_tsk);