From: Julian Braha <julianbraha@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>, nsc@kernel.org
Cc: rdunlap@infradead.org, masahiroy@kernel.org,
grahamr@qti.qualcomm.com, nico@fluxnic.net,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] kconfig: warn on dead default
Date: Tue, 7 Jul 2026 09:32:02 +0100 [thread overview]
Message-ID: <e35e88e8-197a-4deb-bb28-b1e945834017@gmail.com> (raw)
In-Reply-To: <20260707053143.GA1381193@ax162>
Hi Nathan,
On 7/7/26 06:31, Nathan Chancellor wrote:
> Nicolas pushed this into -next, where it fires several times for me. I
> have not looked at these closely yet, I just wanted to get the report
> out so that more eyes could be on it.
Thank you for sharing, I've taken a close look.
> ARCH=powerpc allmodconfig:
>
> arch/powerpc/platforms/Kconfig.cputype:269:warning: default for 'TUNE_CPU' has the same condition as the earlier default at arch/powerpc/platforms/Kconfig.cputype:268
> arch/powerpc/platforms/Kconfig.cputype:270:warning: default for 'TUNE_CPU' has the same condition as the earlier default at arch/powerpc/platforms/Kconfig.cputype:268
> lib/Kconfig.debug:1083:warning: default for 'PANIC_TIMEOUT' is unreachable: earlier default at arch/powerpc/Kconfig:350 is unconditional
> arch/Kconfig:1194:warning: default for 'PGTABLE_LEVELS' is unreachable: earlier default at arch/powerpc/Kconfig:482 is unconditional
>
> ARCH=s390 allmodconfig:
>
> arch/Kconfig:1194:warning: default for 'PGTABLE_LEVELS' is unreachable: earlier default at arch/s390/Kconfig:295 is unconditional
> lib/Kconfig:372:warning: default for 'HAS_IOMEM' is unreachable: earlier default at arch/s390/Kconfig:760 is unconditional
It seems to me that all of these instances are probably intended by the
architectures to override the global default.
Personally, I find this redefine-and-override style confusing as it
requires the reader to think about the order of imports in kconfig. I'll
throw them in my kconfig cleanup pile, and see what the relevant
maintainers think of my version.
> When building with clang-23, which supports '-fms-anonymous-struct':
>
> init/Kconfig:978:warning: default for 'CC_MS_EXTENSIONS' is unreachable: earlier default at init/Kconfig:977 is unconditional
>
> I think the init/Kconfig and arch/powerpc/platforms/Kconfig.cputype ones
> are intentional due to how cc-option works but I know those might be
> hard to silence because they are already evaluated by this stage if I
> understand correctly? Not sure about the other ones (apologies if they
> are already known or have fixes).
Yeah, let's leave these alone.
Best not to merge this. Thank you all for taking a look.
- Julian Braha
prev parent reply other threads:[~2026-07-07 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-06 14:00 [PATCH] kconfig: warn on dead default Julian Braha
2026-06-06 14:23 ` Sam Ravnborg
2026-06-06 15:01 ` Julian Braha
2026-06-06 17:36 ` Sam Ravnborg
2026-07-07 5:31 ` Nathan Chancellor
2026-07-07 6:06 ` Nicolas Schier
2026-07-07 8:32 ` Julian Braha [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=e35e88e8-197a-4deb-bb28-b1e945834017@gmail.com \
--to=julianbraha@gmail.com \
--cc=grahamr@qti.qualcomm.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nico@fluxnic.net \
--cc=nsc@kernel.org \
--cc=rdunlap@infradead.org \
/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