mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: remove unused cpumask variable in mm_cid_get()
@ 2025-10-09 19:48 Kriish Sharma
  2025-10-14  9:56 ` Breno Leitao
  2025-10-14 10:31 ` Peter Zijlstra
  0 siblings, 2 replies; 8+ messages in thread
From: Kriish Sharma @ 2025-10-09 19:48 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider
  Cc: linux-kernel, david.hunter.linux, skhan, Kriish Sharma

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@gmail.com>
---
 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


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

end of thread, other threads:[~2025-10-21 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-09 19:48 [PATCH] sched: remove unused cpumask variable in mm_cid_get() Kriish Sharma
2025-10-14  9:56 ` Breno Leitao
2025-10-14 10:13   ` Vlastimil Babka
2025-10-14 10:34     ` Peter Zijlstra
2025-10-21 12:01       ` Uwe Kleine-König
2025-10-21 13:30         ` Peter Zijlstra
2025-10-21 20:02           ` Krzysztof Kozlowski
2025-10-14 10:31 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®