cgroup: remove unused macro for_each_e_css()

Message ID 20230527093353.153078-1-linmiaohe@huawei.com
State New
Headers
Series cgroup: remove unused macro for_each_e_css() |

Commit Message

Miaohe Lin May 27, 2023, 9:33 a.m. UTC
  for_each_e_css() is unused now. Remove it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 kernel/cgroup/cgroup.c | 15 ---------------
 1 file changed, 15 deletions(-)
  

Comments

Yosry Ahmed May 27, 2023, 3:55 a.m. UTC | #1
On Fri, May 26, 2023 at 6:43 PM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> for_each_e_css() is unused now. Remove it.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

LGTM. I can't see any references in Linus's tree or mm-unstable.

Reviewed-by: Yosry Ahmed <yosryahmed@google.com>

> ---
>  kernel/cgroup/cgroup.c | 15 ---------------
>  1 file changed, 15 deletions(-)
>
> diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
> index 625d7483951c..413b4f1f1b70 100644
> --- a/kernel/cgroup/cgroup.c
> +++ b/kernel/cgroup/cgroup.c
> @@ -689,21 +689,6 @@ EXPORT_SYMBOL_GPL(of_css);
>                                 lockdep_is_held(&cgroup_mutex)))) { }   \
>                 else
>
> -/**
> - * for_each_e_css - iterate all effective css's of a cgroup
> - * @css: the iteration cursor
> - * @ssid: the index of the subsystem, CGROUP_SUBSYS_COUNT after reaching the end
> - * @cgrp: the target cgroup to iterate css's of
> - *
> - * Should be called under cgroup_[tree_]mutex.
> - */
> -#define for_each_e_css(css, ssid, cgrp)                                            \
> -       for ((ssid) = 0; (ssid) < CGROUP_SUBSYS_COUNT; (ssid)++)            \
> -               if (!((css) = cgroup_e_css_by_mask(cgrp,                    \
> -                                                  cgroup_subsys[(ssid)]))) \
> -                       ;                                                   \
> -               else
> -
>  /**
>   * do_each_subsys_mask - filter for_each_subsys with a bitmask
>   * @ss: the iteration cursor
> --
> 2.27.0
>
  
Michal Koutný June 1, 2023, 2:06 p.m. UTC | #2
On Sat, May 27, 2023 at 05:33:53PM +0800, Miaohe Lin <linmiaohe@huawei.com> wrote:
> for_each_e_css() is unused now. Remove it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  kernel/cgroup/cgroup.c | 15 ---------------
>  1 file changed, 15 deletions(-)

Reviewed-by: Michal Koutný <mkoutny@suse.com>
  
Tejun Heo June 5, 2023, 7:20 p.m. UTC | #3
On Sat, May 27, 2023 at 05:33:53PM +0800, Miaohe Lin wrote:
> for_each_e_css() is unused now. Remove it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Applied to cgroup/for-6.5.

Thanks.
  

Patch

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 625d7483951c..413b4f1f1b70 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -689,21 +689,6 @@  EXPORT_SYMBOL_GPL(of_css);
 				lockdep_is_held(&cgroup_mutex)))) { }	\
 		else
 
-/**
- * for_each_e_css - iterate all effective css's of a cgroup
- * @css: the iteration cursor
- * @ssid: the index of the subsystem, CGROUP_SUBSYS_COUNT after reaching the end
- * @cgrp: the target cgroup to iterate css's of
- *
- * Should be called under cgroup_[tree_]mutex.
- */
-#define for_each_e_css(css, ssid, cgrp)					    \
-	for ((ssid) = 0; (ssid) < CGROUP_SUBSYS_COUNT; (ssid)++)	    \
-		if (!((css) = cgroup_e_css_by_mask(cgrp,		    \
-						   cgroup_subsys[(ssid)]))) \
-			;						    \
-		else
-
 /**
  * do_each_subsys_mask - filter for_each_subsys with a bitmask
  * @ss: the iteration cursor