Skip to content

Commit

Permalink
powerpc/xmon: fix task state output
Browse files Browse the repository at this point in the history
p_state is unsigned since the commit 2f064a5

The patch also uses TASK_RUNNING instead of null.

Fixes: 2f064a5 ("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
  • Loading branch information
Denis Kirjanov authored and Michael Ellerman committed Oct 28, 2021
1 parent 290fe8a commit b1f896c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
@@ -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' :

0 comments on commit b1f896c

Please sign in to comment.