[PATCH] sched: remove unused cpumask variable in mm_cid_get()
From: Kriish Sharma
Date: Thu Oct 09 2025 - 15:50:18 EST
The variable 'cpumask' in mm_cid_get() was assigned but never used,
causing the following build error with -Werror:
kernel/sched/sched.h: In function ‘mm_cid_get’:
kernel/sched/sched.h:3743:25: error: variable ‘cpumask’ set but not used [-Werror=unused-but-set-variable]
3743 | struct cpumask *cpumask;
| ^~~~~~~
Removing the unused variable allows the kernel to compile without errors.
Signed-off-by: Kriish Sharma <kriish.sharma2006@xxxxxxxxx>
---
kernel/sched/sched.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 1f5d07067f60..361f9101cef9 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -3740,11 +3740,9 @@ static inline int mm_cid_get(struct rq *rq, struct task_struct *t,
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);
--
2.34.1