aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/xmon/xmon.c
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2018-10-22 11:54:16 -0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-11-25 17:11:21 +1100
commite3a8379948623e5f03789bbd24055170b6216abd (patch)
tree84999829adf71470b131ed57e4817a9660f127db /arch/powerpc/xmon/xmon.c
parent92a4543209d39215e678e81c0d56de07074bbe3a (diff)
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: Breno Leitao <leitao@debian.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r--arch/powerpc/xmon/xmon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 36b8dc47a3c3..fee96bbabf42 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2793,7 +2793,7 @@ print_address(unsigned long addr)
xmon_print_symbol(addr, "\t# ", "");
}
-void
+static void
dump_log_buf(void)
{
struct kmsg_dumper dumper = { .active = 1 };
@@ -2994,13 +2994,13 @@ static void show_task(struct task_struct *tsk)
printf("%px %016lx %6d %6d %c %2d %s\n", tsk,
tsk->thread.ksp,
- tsk->pid, tsk->parent->pid,
+ tsk->pid, rcu_dereference(tsk->parent)->pid,
state, task_thread_info(tsk)->cpu,
tsk->comm);
}
#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);