Re: [PATCH v1 1/1] sched: Remove never used code in mm_cid_get()

From: Eric Biggers
Date: Fri Oct 24 2025 - 17:19:12 EST


On Mon, Oct 20, 2025 at 12:49:34PM +0200, Peter Zijlstra wrote:
> On Mon, Oct 20, 2025 at 01:10:44PM +0300, Andy Shevchenko wrote:
> > On Wed, Oct 15, 2025 at 11:19:34AM +0200, Andy Shevchenko wrote:
> > > Clang is not happy with set but unused variable (this is visible
> > > with `make W=1` build:
> > >
> > > kernel/sched/sched.h:3744:18: error: variable 'cpumask' set but not used [-Werror,-Wunused-but-set-variable]
> > >
> > > It seems like the variable was never be used along with the assignment that
> > > does not have side effects as far as I can see. Remove those altogether.
> >
> > Anybody to apply this for fixes?
>
> Why? W=1 and WERROR is very much you get to keep the pieces land, no?

Tested-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Linus, could you consider applying this directly? This seems to have
broken W=1 for basically the whole kernel. I see many other people
already ran into this and sent the same patch
(https://lore.kernel.org/r/20251002-sched-w1-v1-1-a6fdf549d179@xxxxxxxxxx
https://lore.kernel.org/r/20251009194818.1587650-1-kriish.sharma2006@xxxxxxxxx
https://lore.kernel.org/r/20251017073050.2411988-1-kevin.brodsky@xxxxxxx
https://lore.kernel.org/r/20251020220601.176639-1-adigollamudi@xxxxxxxxx)
but unfortunately the maintainer is refusing to apply any of them.

I find W=1 to be useful, and I keep my subsystems W=1 clean. But I
cannot do that if W=1 is broken for all kernel builds.

I think it's clear that a lot of other people find it useful too.

- Eric