summaryrefslogtreecommitdiff
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorDenis Kirjanov <kda@linux-powerpc.org>2021-10-26 16:31:08 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2021-10-28 14:32:03 +0300
commitb1f896ce3542eb2eede5949ee2e481526fae1108 (patch)
tree4543d0c3468189d58d8040ae0305750cc245f6b7 /arch/powerpc/xmon
parent290fe8aa69ef5c51c778c0bb33f8ef0181c769f5 (diff)
downloadlinux-b1f896ce3542eb2eede5949ee2e481526fae1108.tar.xz
powerpc/xmon: fix task state output
p_state is unsigned since the commit 2f064a59a11f The patch also uses TASK_RUNNING instead of null. Fixes: 2f064a59a11f ("sched: Change task_struct::state") Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211026133108.7113-1-kda@linux-powerpc.org
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index dd8241c009e5..8b28ff9d98d1 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3264,8 +3264,7 @@ static void show_task(struct task_struct *volatile tsk)
* appropriate for calling from xmon. This could be moved
* to a common, generic, routine used by both.
*/
- state = (p_state == 0) ? 'R' :
- (p_state < 0) ? 'U' :
+ state = (p_state == TASK_RUNNING) ? 'R' :
(p_state & TASK_UNINTERRUPTIBLE) ? 'D' :
(p_state & TASK_STOPPED) ? 'T' :
(p_state & TASK_TRACED) ? 'C' :