2020-04-08 08:56:31

by Walter Wu

[permalink] [raw]
Subject: [PATCH] stacktrace: cleanup inconsistent variable type

The skip in struct stack_trace has inconsistent type with struct
stack_trace_data, it makes a bit confusion in the relationship
between struct stack_trace and stack_trace_data. In theory,
the skip variable type should be unsigned int.

Signed-off-by: Walter Wu <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Bart Van Assche <[email protected]>
Cc: Andrew Morton <[email protected]>
---
include/linux/stacktrace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h
index 83bd8cb475d7..b7af8cc13eda 100644
--- a/include/linux/stacktrace.h
+++ b/include/linux/stacktrace.h
@@ -64,7 +64,7 @@ void arch_stack_walk_user(stack_trace_consume_fn consume_entry, void *cookie,
struct stack_trace {
unsigned int nr_entries, max_entries;
unsigned long *entries;
- int skip; /* input argument: How many entries to skip */
+ unsigned int skip; /* input argument: How many entries to skip */
};

extern void save_stack_trace(struct stack_trace *trace);
--
2.18.0