From: Peter Zijlstra <peterz@infradead.org>
To: Kriish Sharma <kriish.sharma2006@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org, david.hunter.linux@gmail.com,
skhan@linuxfoundation.org
Subject: Re: [PATCH] sched: remove unused cpumask variable in mm_cid_get()
Date: Tue, 14 Oct 2025 12:31:16 +0200 [thread overview]
Message-ID: <20251014103116.GT3245006@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251009194818.1587650-1-kriish.sharma2006@gmail.com>
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@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
>
prev parent reply other threads:[~2025-10-14 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 19:48 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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251014103116.GT3245006@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=david.hunter.linux@gmail.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kriish.sharma2006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®