The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Breno Leitao <leitao@debian.org>,
	Kriish Sharma <kriish.sharma2006@gmail.com>,
	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,
	Menglong Dong <menglong8.dong@gmail.com>
Subject: Re: [PATCH] sched: remove unused cpumask variable in mm_cid_get()
Date: Tue, 14 Oct 2025 12:34:39 +0200	[thread overview]
Message-ID: <20251014103439.GU3245006@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <67e75a68-7a03-46bb-ae40-b1a8f24c0b16@suse.cz>

On Tue, Oct 14, 2025 at 12:13:23PM +0200, Vlastimil Babka wrote:
> On 10/14/25 11:56, Breno Leitao wrote:
> > 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;
> >>       |                         ^~~~~~~
> > 
> > Thanks for the fix. I am hitting the same issue in my builds.
> 
> Let me add why this years old small issue became much more problematic in
> 6.18-rc1. When I want to test my own files I'm developing on with e.g. "make
> W=1 mm/slub.o", the W=1 hits earlier in:
> 
>   CC      kernel/sched/rq-offsets.s
> In file included from kernel/sched/rq-offsets.c:5:
> kernel/sched/sched.h:3718:18: error: variable 'cpumask' set but not used
> [-Werror,-Wunused-but-set-variable]
>  3718 |         struct cpumask *cpumask;
>       |                         ^
> 1 error generated.
> make[2]: *** [scripts/Makefile.build:182: kernel/sched/rq-offsets.s] Error 1
> 
> So I can't get to the part where I test-compile my own code with W=1. So
> fixing this ASAP in 6.18 would be appreciated, thanks!
> 
> FWIW I've bisected this to commit
> 378b7708194f ("sched: Make migrate_{en,dis}able() inline")

People using W=1 and WERROR can keep the pieces. Anyway, this is a much
more coherent explanation that the original patch.

  reply	other threads:[~2025-10-14 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20251014103439.GU3245006@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=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menglong8.dong@gmail.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=vbabka@suse.cz \
    --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