Make it clear to humans and to the compiler that the stack trace ('entries') arguments are not modified.
Showing the changes to kernel/stacktrace.c (1 of 2 files). Show all
Unified · Split
| @@ -20,7 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | * @nr_entries: Number of entries in the storage array |
| 21 | 21 | * @spaces: Number of leading spaces to print |
| 22 | 22 | */ |
| 23 | −void stack_trace_print(unsigned long *entries, unsigned int nr_entries, | |
| 23 | +void stack_trace_print(const unsigned long *entries, unsigned int nr_entries, | |
| 24 | 24 | int spaces) |
| 25 | 25 | { |
| 26 | 26 | unsigned int i; |
| @@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(stack_trace_print); · 16 unmodified lines | ||
| 43 | 43 | * |
| 44 | 44 | * Return: Number of bytes printed. |
| 45 | 45 | */ |
| 46 | −int stack_trace_snprint(char *buf, size_t size, unsigned long *entries, | |
| 46 | +int stack_trace_snprint(char *buf, size_t size, const unsigned long *entries, | |
| 47 | 47 | unsigned int nr_entries, int spaces) |
| 48 | 48 | { |
| 49 | 49 | unsigned int generated, i, total = 0; |