workqueue: remove unnecessary import and function in wq_monitor.py
authorKemeng Shi <shikemeng@huaweicloud.com>
Thu, 21 Mar 2024 15:04:20 +0000 (23:04 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 25 Mar 2024 20:11:32 +0000 (10:11 -1000)
Remove unnecessary import and function in wq_monitor.py

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/workqueue/wq_monitor.py

index a8856a9c45dcc954df5bf3587abfbb475afb8d9c..9e964c5be40c9ff7b9f52612e064faaada4e98bc 100644 (file)
@@ -32,16 +32,13 @@ https://github.com/osandov/drgn.
   rescued  The number of work items executed by the rescuer.
 """
 
-import sys
 import signal
-import os
 import re
 import time
 import json
 
 import drgn
-from drgn.helpers.linux.list import list_for_each_entry,list_empty
-from drgn.helpers.linux.cpumask import for_each_possible_cpu
+from drgn.helpers.linux.list import list_for_each_entry
 
 import argparse
 parser = argparse.ArgumentParser(description=desc,
@@ -54,10 +51,6 @@ parser.add_argument('-j', '--json', action='store_true',
                     help='Output in json')
 args = parser.parse_args()
 
-def err(s):
-    print(s, file=sys.stderr, flush=True)
-    sys.exit(1)
-
 workqueues              = prog['workqueues']
 
 WQ_UNBOUND              = prog['WQ_UNBOUND']