Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Elijah Conners and committed by
Tejun Heo
b74440d8 61c41711

+5 -5
+5 -5
tools/cgroup/iocost_monitor.py
··· 61 61 } 62 62 63 63 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 + 64 69 def blkcg_name(blkcg): 65 70 return blkcg.css.cgroup.kn.name.string_().decode('utf-8') 66 71 ··· 86 81 for c in list_for_each_entry('struct blkcg', 87 82 blkcg.css.children.address_of_(), 'css.sibling'): 88 83 self.walk(c, q_id, path) 89 - 90 - def __init__(self, root_blkcg, q_id, include_dying=False): 91 - self.include_dying = include_dying 92 - self.blkgs = [] 93 - self.walk(root_blkcg, q_id, '') 94 84 95 85 def __iter__(self): 96 86 return iter(self.blkgs)