Re: [Intel-gfx] [PATCH 03/12] cgroup: use for_each_if

2018-07-11 Thread Tejun Heo
On Mon, Jul 09, 2018 at 10:36:41AM +0200, Daniel Vetter wrote:
> Avoids the need to invert the condition instead of the open-coded
> version.
> 
> Signed-off-by: Daniel Vetter 
> Cc: Tejun Heo 
> Cc: Li Zefan 
> Cc: Johannes Weiner 
> Cc: cgro...@vger.kernel.org

Acked-by: Tejun Heo 

Please feel free to route as you see fit.

Thanks.

-- 
tejun
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 03/12] cgroup: use for_each_if

2018-07-09 Thread Daniel Vetter
Avoids the need to invert the condition instead of the open-coded
version.

Signed-off-by: Daniel Vetter 
Cc: Tejun Heo 
Cc: Li Zefan 
Cc: Johannes Weiner 
Cc: cgro...@vger.kernel.org
---
 include/linux/cgroup.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c9fdf6f57913..666c6200d61d 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -287,9 +287,7 @@ void css_task_iter_end(struct css_task_iter *it);
for ((leader) = cgroup_taskset_first((tset), &(dst_css));   \
 (leader);  \
 (leader) = cgroup_taskset_next((tset), &(dst_css)))\
-   if ((leader) != (leader)->group_leader) \
-   ;   \
-   else
+   for_each_if ((leader) == (leader)->group_leader)
 
 /*
  * Inline functions.
-- 
2.18.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx