From: Kunwu Chan <[email protected]>

Use the kernel's standard symbolic task-state representation instead of
printing raw hexadecimal task-state values.

Suggested-by: Zqiang <[email protected]>
Co-developed-by: Wang Lian <[email protected]>
Signed-off-by: Wang Lian <[email protected]>
Signed-off-by: Kunwu Chan <[email protected]>
---
 kernel/rcu/hazptrtorture.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/hazptrtorture.c b/kernel/rcu/hazptrtorture.c
index 0da0a4606..19ea479c9 100644
--- a/kernel/rcu/hazptrtorture.c
+++ b/kernel/rcu/hazptrtorture.c
@@ -497,10 +497,10 @@ hazptr_torture_stats_print(void)
                unsigned long __maybe_unused gp_seq = 0;
 
                wtp = READ_ONCE(writer_task);
-               pr_alert("??? Writer stall state %s(%d) g%lu f%#x ->state %#x 
cpu %d\n",
+               pr_alert("??? Writer stall state %s(%d) g%lu f%#x ->state %c 
cpu %d\n",
                         hazptr_torture_writer_state_getname(),
                         hazptr_torture_writer_state, gp_seq, flags,
-                        wtp == NULL ? ~0U : wtp->__state,
+                        wtp == NULL ? '?' : task_state_to_char(wtp),
                         wtp == NULL ? -1 : (int)task_cpu(wtp));
                if (!splatted && wtp) {
                        sched_show_task(wtp);
-- 
2.43.0


Reply via email to