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 | * @nr_entries: Number of entries in the storage array | 20 | * @nr_entries: Number of entries in the storage array |
| 21 | * @spaces: Number of leading spaces to print | 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 | int spaces) | 24 | int spaces) |
| 25 | { | 25 | { |
| 26 | unsigned int i; | 26 | unsigned int i; |
| @@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(stack_trace_print); · 16 unmodified lines | |||
| 43 | * | 43 | * |
| 44 | * Return: Number of bytes printed. | 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 | unsigned int nr_entries, int spaces) | 47 | unsigned int nr_entries, int spaces) |
| 48 | { | 48 | { |
| 49 | unsigned int generated, i, total = 0; | 49 | unsigned int generated, i, total = 0; |