Commit e3a83799 authored by Breno Leitao's avatar Breno Leitao Committed by Michael Ellerman

powerpc/xmon: Define static functions

Currently sparse is complaining about three issues on the xmon code. Two
storage classes issues and a dereferencing a 'noderef'  pointer. These are
the warnings:

	arch/powerpc/xmon/xmon.c:2783:1: warning: symbol 'dump_log_buf' was not declared. Should it be static?
	arch/powerpc/xmon/xmon.c:2989:6: warning: symbol 'format_pte' was not declared. Should it be static?
	arch/powerpc/xmon/xmon.c:2983:30: warning: dereference of noderef expression

This patch fixes all of them, turning both functions static and
dereferencing a pointer calling rcu_dereference() instead of a
straightforward dereference.
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 92a45432
...@@ -2793,7 +2793,7 @@ print_address(unsigned long addr) ...@@ -2793,7 +2793,7 @@ print_address(unsigned long addr)
xmon_print_symbol(addr, "\t# ", ""); xmon_print_symbol(addr, "\t# ", "");
} }
void static void
dump_log_buf(void) dump_log_buf(void)
{ {
struct kmsg_dumper dumper = { .active = 1 }; struct kmsg_dumper dumper = { .active = 1 };
...@@ -2994,13 +2994,13 @@ static void show_task(struct task_struct *tsk) ...@@ -2994,13 +2994,13 @@ static void show_task(struct task_struct *tsk)
printf("%px %016lx %6d %6d %c %2d %s\n", tsk, printf("%px %016lx %6d %6d %c %2d %s\n", tsk,
tsk->thread.ksp, tsk->thread.ksp,
tsk->pid, tsk->parent->pid, tsk->pid, rcu_dereference(tsk->parent)->pid,
state, task_thread_info(tsk)->cpu, state, task_thread_info(tsk)->cpu,
tsk->comm); tsk->comm);
} }
#ifdef CONFIG_PPC_BOOK3S_64 #ifdef CONFIG_PPC_BOOK3S_64
void format_pte(void *ptep, unsigned long pte) static void format_pte(void *ptep, unsigned long pte)
{ {
pte_t entry = __pte(pte); pte_t entry = __pte(pte);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment