lkml.org 
[lkml]   [2026]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RESEND PATCH] s390: fix dead defaults for S390_MODULES_SANITY_TEST and S390_UNWIND_SELFTEST
From
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

- Julian Braha

\
 
 \ /
  Last update: 2026-04-29 23:39    [W:0.110 / U:2.687 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog