public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: drop unused variable cpumask in mm_cid_get()
@ 2025-10-02 11:23 André Draszik
  2025-10-04  8:35 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: André Draszik @ 2025-10-02 11:23 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider
  Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
	linux-kernel, André Draszik

When compiling with W=1, we get the following warning:

In file included from kernel/sched/rq-offsets.c:5:
kernel/sched/sched.h:3743:18: error: variable 'cpumask' set but not used [-Werror,-Wunused-but-set-variable]
 3743 |         struct cpumask *cpumask;
      |                         ^
1 error generated.

Simply drop the variable.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
 kernel/sched/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 1f5d07067f60a3195c11b0bfe203e027ebc3e3c5..361f9101cef97cde2b4cae963c3eed6e745283c8 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);

---
base-commit: 3b9b1f8df454caa453c7fb07689064edb2eda90a
change-id: 20251002-sched-w1-c45c284e1775

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>


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

end of thread, other threads:[~2025-10-04  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 11:23 [PATCH] sched: drop unused variable cpumask in mm_cid_get() André Draszik
2025-10-04  8:35 ` Dan Carpenter

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