[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251014103116.GT3245006@noisy.programming.kicks-ass.net>
Date: Tue, 14 Oct 2025 12:31:16 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Kriish Sharma <kriish.sharma2006@...il.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org, david.hunter.linux@...il.com,
skhan@...uxfoundation.org
Subject: Re: [PATCH] sched: remove unused cpumask variable in mm_cid_get()
On Thu, Oct 09, 2025 at 07:48:18PM +0000, Kriish Sharma wrote:
> 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.
How come I don't see build errors myself?
Anyway, Thomas is in the process or rewriting all this, I'm not inclined
to bother with this unless the build robots actually complain.
Also, you're missing a Fixes tag or something, some commit must've
caused this.
> Signed-off-by: Kriish Sharma <kriish.sharma2006@...il.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
>
Powered by blists - more mailing lists