History

stacktrace: Constify 'entries' arguments

Make it clear to humans and to the compiler that the stack trace ('entries') arguments are not modified.

Bart Van Assche committed 7 years ago

Commit a2970421 parent 364f6af2 files · +4 −4Browse files

Showing the changes to kernel/stacktrace.c (1 of 2 files). Show all

Unified · Split

kernel/stacktrace.c+2−2
@@ -20,7 +20,7 @@ · 19 unmodified lines
20 * @nr_entries: Number of entries in the storage array20 * @nr_entries: Number of entries in the storage array
21 * @spaces: Number of leading spaces to print21 * @spaces: Number of leading spaces to print
22 */22 */
23void stack_trace_print(unsigned long *entries, unsigned int nr_entries,23void 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 */
46int stack_trace_snprint(char *buf, size_t size, unsigned long *entries,46int 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;