Skip to contentSkip to conversation

mm/memcontrol: fix a -Wunused-function warning

PATCH In review Qian Cai 2 participants 2 messages Sep 16, 2019 – Sep 17, 2019

Subsystems (3)
lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 mm/memcontrol: fix a -Wunused-function warning

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.

---
 mm/memcontrol.c | 5 -----
 1 file changed, 5 deletions(-)
mm/memcontrol.c +0 -5
index 9ec5e12486a7..9a375b376157 100644
@@ -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);
Signature · 1 line
1.8.3.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · 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.

Quoted 22 lines
---
 mm/memcontrol.c | 5 -----
 1 file changed, 5 deletions(-)
mm/memcontrol.c +0 -5
index 9ec5e12486a7..9a375b376157 100644
@@ -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);
Signature · 1 line
1.8.3.1
Signature · 2 lines
Michal Hocko
SUSE Labs