[PATCH 5/9] Remove unnecessary imports

From: Elisha Hollander
Date: Mon May 24 2021 - 11:28:28 EST


---
scripts/clang-tools/run-clang-tools.py | 1 -
scripts/gdb/linux/clk.py | 1 -
scripts/gdb/linux/genpd.py | 1 -
scripts/gdb/linux/modules.py | 2 +-
tools/cgroup/iocost_monitor.py | 1 -
tools/cgroup/memcg_slabinfo.py | 2 --
tools/perf/scripts/python/compaction-times.py | 1 -
tools/perf/scripts/python/event_analyzing_sample.py | 1 -
tools/perf/scripts/python/mem-phys-addr.py | 1 -
9 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
index f754415af398..f298c07e948a 100755
--- a/scripts/clang-tools/run-clang-tools.py
+++ b/scripts/clang-tools/run-clang-tools.py
@@ -12,7 +12,6 @@ compile_commands.json.
import argparse
import json
import multiprocessing
-import os
import subprocess
import sys

diff --git a/scripts/gdb/linux/clk.py b/scripts/gdb/linux/clk.py
index 061aecfa294e..7a7d81539fcd 100644
--- a/scripts/gdb/linux/clk.py
+++ b/scripts/gdb/linux/clk.py
@@ -3,7 +3,6 @@
# Copyright (c) NXP 2019

import gdb
-import sys

from linux import utils, lists, constants

diff --git a/scripts/gdb/linux/genpd.py b/scripts/gdb/linux/genpd.py
index 39cd1abd8559..f0e4ae7b47f4 100644
--- a/scripts/gdb/linux/genpd.py
+++ b/scripts/gdb/linux/genpd.py
@@ -3,7 +3,6 @@
# Copyright (c) NXP 2019

import gdb
-import sys

from linux.utils import CachedType
from linux.lists import list_for_each_entry
diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py
index 441b23239896..d8e771bb22e7 100644
--- a/scripts/gdb/linux/modules.py
+++ b/scripts/gdb/linux/modules.py
@@ -13,7 +13,7 @@

import gdb

-from linux import cpus, utils, lists
+from linux import utils, lists


module_type = utils.CachedType("struct module")
diff --git a/tools/cgroup/iocost_monitor.py b/tools/cgroup/iocost_monitor.py
index c4ff907c078b..364625ba4a2f 100644
--- a/tools/cgroup/iocost_monitor.py
+++ b/tools/cgroup/iocost_monitor.py
@@ -13,7 +13,6 @@ import sys
import re
import time
import json
-import math

import drgn
from drgn import container_of
diff --git a/tools/cgroup/memcg_slabinfo.py b/tools/cgroup/memcg_slabinfo.py
index 1600b17dbb8a..1962f7618ea8 100644
--- a/tools/cgroup/memcg_slabinfo.py
+++ b/tools/cgroup/memcg_slabinfo.py
@@ -9,8 +9,6 @@ import sys

from drgn.helpers.linux import list_for_each_entry, list_empty
from drgn.helpers.linux import for_each_page
-from drgn.helpers.linux.cpumask import for_each_online_cpu
-from drgn.helpers.linux.percpu import per_cpu_ptr
from drgn import container_of, FaultError, Object


diff --git a/tools/perf/scripts/python/compaction-times.py b/tools/perf/scripts/python/compaction-times.py
index 2560a042dc6f..5822b552756d 100644
--- a/tools/perf/scripts/python/compaction-times.py
+++ b/tools/perf/scripts/python/compaction-times.py
@@ -4,7 +4,6 @@
# testing:
# 'echo 1 > /proc/sys/vm/compact_memory' to force compaction of all zones

-import os
import sys
import re

diff --git a/tools/perf/scripts/python/event_analyzing_sample.py b/tools/perf/scripts/python/event_analyzing_sample.py
index aa1e2cfa26a6..8d0fbb78900e 100644
--- a/tools/perf/scripts/python/event_analyzing_sample.py
+++ b/tools/perf/scripts/python/event_analyzing_sample.py
@@ -20,7 +20,6 @@ from __future__ import print_function
import os
import sys
import math
-import struct
import sqlite3

sys.path.append(os.environ['PERF_EXEC_PATH'] + \
diff --git a/tools/perf/scripts/python/mem-phys-addr.py b/tools/perf/scripts/python/mem-phys-addr.py
index 1f332e72b9b0..66b7ee8254c3 100644
--- a/tools/perf/scripts/python/mem-phys-addr.py
+++ b/tools/perf/scripts/python/mem-phys-addr.py
@@ -8,7 +8,6 @@ from __future__ import print_function

import os
import sys
-import struct
import re
import bisect
import collections
--
2.25.1