Messages in this thread |  | | Date | Wed, 6 May 2026 14:37:53 +0200 | | From | Alexander Gordeev <> | | Subject | Re: [RESEND PATCH] s390: fix dead defaults for S390_MODULES_SANITY_TEST and S390_UNWIND_SELFTEST |
| |
On Wed, Apr 29, 2026 at 10:39:14PM +0100, Julian Braha wrote:
Hi Julian,
> On Wed, 29 Apr 2026, Alexander Gordeev <agordeev@linux.ibm.com> wrote: > > This tool is still in development, right? > > You can find the latest release (v0.7) outside the tree here: > https://github.com/julianbraha/kconfirm > > And there's also a recent RFC to move it into the tree here: > https://lore.kernel.org/all/20260427174429.779474-1-julianbraha@gmail.com/ > > > Anyway, I do not quite get what do you mean with the dead code. > > Could you please elaborate? > > Sure! In kconfig, default statements are evaluated in the order > they appear (top --> bottom). This means that if you have an > unconditional default statement at the top, e.g. 'default n', then all > of the default statements that follow it will never be evaluated - in > other words, they are dead code. > > In the case of this code in particular, the 'def_tristate n' at the top > does two things: > 1. declares the type of the config option as a tristate, > 2. sets the default value to 'n' unconditionally. > > So, the 'default KUNIT_ALL_TESTS' statement that follows is dead code. > > See also this sentence from the "Menu attributes" section of the kconfig > docs: > "If multiple default values are visible, only the first defined one is > active." > Source: > https://docs.kernel.org/kbuild/kconfig-language.html
Thanks a lot for the clarificaiton!
In the end of the day I see no impact on the end result (aka the generated config) - please correct me if I am wrong.
I think once the tool is officially included you could refer to it in the commit message, but please do not add the described commits as Fixes - these are no real issues.
> - Julian Braha
Thanks!
|  |