Skip to content

Commit b74440d

Browse files
ElijahPepehtejun
authored andcommitted
iocost_monitor: reorder BlkgIterator
In order to comply with PEP 8, the first parameter of a class should be __init__. Signed-off-by: Elijah Conners <business@elijahpepe.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 61c4171 commit b74440d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/cgroup/iocost_monitor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def err(s):
6161
}
6262

6363
class BlkgIterator:
64+
def __init__(self, root_blkcg, q_id, include_dying=False):
65+
self.include_dying = include_dying
66+
self.blkgs = []
67+
self.walk(root_blkcg, q_id, '')
68+
6469
def blkcg_name(blkcg):
6570
return blkcg.css.cgroup.kn.name.string_().decode('utf-8')
6671

@@ -82,11 +87,6 @@ def walk(self, blkcg, q_id, parent_path):
8287
blkcg.css.children.address_of_(), 'css.sibling'):
8388
self.walk(c, q_id, path)
8489

85-
def __init__(self, root_blkcg, q_id, include_dying=False):
86-
self.include_dying = include_dying
87-
self.blkgs = []
88-
self.walk(root_blkcg, q_id, '')
89-
9090
def __iter__(self):
9191
return iter(self.blkgs)
9292

0 commit comments

Comments
 (0)