[PATCH 3/3] tools/workqueue/wq_dump.py: add NODE prefix to all node columns

Breno Leitao posted 3 patches 1 month ago
[PATCH 3/3] tools/workqueue/wq_dump.py: add NODE prefix to all node columns
Posted by Breno Leitao 1 month ago
Previously only the first node column showed "NODE 0" while subsequent
columns showed just the bare node number, making it unclear what the
numbers refer to.

Add the "NODE" prefix to all node columns and remove the now-unnecessary
first/else branching.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 tools/workqueue/wq_dump.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tools/workqueue/wq_dump.py b/tools/workqueue/wq_dump.py
index bddfeb9fc2a8e..fb3b87aa40cf8 100644
--- a/tools/workqueue/wq_dump.py
+++ b/tools/workqueue/wq_dump.py
@@ -228,13 +228,8 @@ if 'node_to_cpumask_map' in prog:
     print('')
 
     print(f'[{"workqueue":^{WQ_NAME_LEN-1}} {"min":>4} {"max":>4}', end='')
-    first = True
     for node in for_each_node():
-        if first:
-            print(f'  {"NODE " + str(node):>8}', end='')
-            first = False
-        else:
-            print(f' {node:>9}', end='')
+        print(f' {"NODE " + str(node):>9}', end='')
     print(f' {"dfl":>9} ]')
     print('')
 

-- 
2.47.3