From 08d36b191f337dac643ec3365cc5d2e56c9f2d64 Mon Sep 17 00:00:00 2001 From: Guopeng Zhang Date: Mon, 13 Jul 2026 17:37:37 +0800 Subject: [PATCH] mm: memcg-v1: make mem_cgroup_oom_notify_cb() return void Commit 7d74b06f240f ("memcg: use for_each_mem_cgroup") replaced the mem_cgroup_walk_tree() call in mem_cgroup_oom_notify() with for_each_mem_cgroup_tree(), but left mem_cgroup_oom_notify_cb() with the int return type required by the old callback interface. The function now has a single direct caller and no failure path. Make it return void. Link: https://lore.kernel.org/20260713093737.3299646-1-guopeng.zhang@linux.dev Signed-off-by: Guopeng Zhang Acked-by: Michal Hocko Acked-by: Johannes Weiner Reviewed-by: Muchun Song Reviewed-by: SJ Park Acked-by: Shakeel Butt Cc: Roman Gushchin Signed-off-by: Andrew Morton --- mm/memcontrol-v1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index e43b13208eca..2dc599484d00 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -752,7 +752,7 @@ static int compare_thresholds(const void *a, const void *b) return 0; } -static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) +static void mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) { struct mem_cgroup_eventfd_list *ev; @@ -762,7 +762,6 @@ static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) eventfd_signal(ev->eventfd); spin_unlock(&memcg_oom_lock); - return 0; } static void mem_cgroup_oom_notify(struct mem_cgroup *memcg)