From: Andy Shevchenko Date: Wed, 15 Oct 2025 09:19:34 +0000 (+0200) Subject: sched: Remove never used code in mm_cid_get() X-Git-Tag: v6.6.115~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d63703bec0c1fb3c68b47811f6d977183badf89;p=thirdparty%2Fkernel%2Fstable.git sched: Remove never used code in mm_cid_get() [ Upstream commit 53abe3e1c154628cc74e33a1bfcd865656e433a5 ] Clang is not happy with set but unused variable (this is visible with `make W=1` build: kernel/sched/sched.h:3744:18: error: variable 'cpumask' set but not used [-Werror,-Wunused-but-set-variable] It seems like the variable was never used along with the assignment that does not have side effects as far as I can see. Remove those altogether. Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid") Signed-off-by: Andy Shevchenko Tested-by: Eric Biggers Reviewed-by: Breno Leitao Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index f7cb505ab337..64634314a89c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3435,11 +3435,9 @@ end: static inline int mm_cid_get(struct rq *rq, struct mm_struct *mm) { struct mm_cid __percpu *pcpu_cid = mm->pcpu_cid; - struct cpumask *cpumask; int cid; lockdep_assert_rq_held(rq); - cpumask = mm_cidmask(mm); cid = __this_cpu_read(pcpu_cid->cid); if (mm_cid_is_valid(cid)) { mm_cid_snapshot_time(rq, mm);