linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/memcontrol: fix a -Wunused-function warning
@ 2019-09-16 15:40 Qian Cai
  2019-09-17  7:40 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Qian Cai @ 2019-09-16 15:40 UTC (permalink / raw)
  To: akpm
  Cc: hannes, mhocko, vdavydov.dev, cgroups, linux-mm, linux-kernel, Qian Cai

mem_cgroup_id_get() was introduced in the commit 73f576c04b94
("mm:memcontrol: fix cgroup creation failure after many small jobs").

Later, it no longer has any user since the commits,

1f47b61fb407 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup")
58fa2a5512d9 ("mm: memcontrol: add sanity checks for memcg->id.ref on get/put")

so safe to remove it.

Signed-off-by: Qian Cai <cai@lca.pw>
---
 mm/memcontrol.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 9ec5e12486a7..9a375b376157 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4675,11 +4675,6 @@ static void mem_cgroup_id_put_many(struct mem_cgroup *memcg, unsigned int n)
 	}
 }
 
-static inline void mem_cgroup_id_get(struct mem_cgroup *memcg)
-{
-	mem_cgroup_id_get_many(memcg, 1);
-}
-
 static inline void mem_cgroup_id_put(struct mem_cgroup *memcg)
 {
 	mem_cgroup_id_put_many(memcg, 1);
-- 
1.8.3.1



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

* Re: [PATCH] mm/memcontrol: fix a -Wunused-function warning
  2019-09-16 15:40 [PATCH] mm/memcontrol: fix a -Wunused-function warning Qian Cai
@ 2019-09-17  7:40 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2019-09-17  7:40 UTC (permalink / raw)
  To: Qian Cai; +Cc: akpm, hannes, vdavydov.dev, cgroups, linux-mm, linux-kernel

On Mon 16-09-19 11:40:53, Qian Cai wrote:
> mem_cgroup_id_get() was introduced in the commit 73f576c04b94
> ("mm:memcontrol: fix cgroup creation failure after many small jobs").
> 
> Later, it no longer has any user since the commits,
> 
> 1f47b61fb407 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup")
> 58fa2a5512d9 ("mm: memcontrol: add sanity checks for memcg->id.ref on get/put")
> 
> so safe to remove it.
> 
> Signed-off-by: Qian Cai <cai@lca.pw>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  mm/memcontrol.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 9ec5e12486a7..9a375b376157 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4675,11 +4675,6 @@ static void mem_cgroup_id_put_many(struct mem_cgroup *memcg, unsigned int n)
>  	}
>  }
>  
> -static inline void mem_cgroup_id_get(struct mem_cgroup *memcg)
> -{
> -	mem_cgroup_id_get_many(memcg, 1);
> -}
> -
>  static inline void mem_cgroup_id_put(struct mem_cgroup *memcg)
>  {
>  	mem_cgroup_id_put_many(memcg, 1);
> -- 
> 1.8.3.1

-- 
Michal Hocko
SUSE Labs


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

end of thread, other threads:[~2019-09-17  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 15:40 [PATCH] mm/memcontrol: fix a -Wunused-function warning Qian Cai
2019-09-17  7:40 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).