mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iocost_monitor: reorder BlkgIterator
@ 2022-08-30 14:38 Elijah Conners
  2022-09-24  2:57 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Elijah Conners @ 2022-08-30 14:38 UTC (permalink / raw)
  To: axboe
  Cc: linux-block, linux-kernel, cgroups, josef, asmlsilence, minglei,
	bvanassche

In order to comply with PEP 8, the first parameter of a class should be
__init__.

Signed-off-by: Elijah Conners <business@elijahpepe.com> 
---
 tools/cgroup/iocost_monitor.py                |  10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/cgroup/iocost_monitor.py b/tools/cgroup/iocost_monitor.py
index c4ff907c078b..0dbbc67400fc 100644
--- a/tools/cgroup/iocost_monitor.py
+++ b/tools/cgroup/iocost_monitor.py
@@ -61,6 +61,11 @@ autop_names = {
 }

 class BlkgIterator:
+    def __init__(self, root_blkcg, q_id, include_dying=False):
+        self.include_dying = include_dying
+        self.blkgs = []
+        self.walk(root_blkcg, q_id, '')
+
     def blkcg_name(blkcg):
         return blkcg.css.cgroup.kn.name.string_().decode('utf-8')

@@ -82,11 +87,6 @@ class BlkgIterator:
                                      blkcg.css.children.address_of_(), 'css.sibling'):
             self.walk(c, q_id, path)

-    def __init__(self, root_blkcg, q_id, include_dying=False):
-        self.include_dying = include_dying
-        self.blkgs = []
-        self.walk(root_blkcg, q_id, '')
-
     def __iter__(self):
         return iter(self.blkgs)

--
2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] iocost_monitor: reorder BlkgIterator
  2022-08-30 14:38 [PATCH] iocost_monitor: reorder BlkgIterator Elijah Conners
@ 2022-09-24  2:57 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2022-09-24  2:57 UTC (permalink / raw)
  To: Elijah Conners
  Cc: axboe, linux-block, linux-kernel, cgroups, josef, asmlsilence,
	minglei, bvanassche

On Tue, Aug 30, 2022 at 07:38:27AM -0700, Elijah Conners wrote:
> In order to comply with PEP 8, the first parameter of a class should be
> __init__.
> 
> Signed-off-by: Elijah Conners <business@elijahpepe.com> 

Applied to cgroup/for-6.1.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-24  2:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 14:38 [PATCH] iocost_monitor: reorder BlkgIterator Elijah Conners
2022-09-24  2:57 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®