From: Julian Braha <julianbraha@gmail.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: gor@linux.ibm.com, hca@linux.ibm.com, iii@linux.ibm.com,
meted@linux.ibm.com, borntraeger@linux.ibm.com,
svens@linux.ibm.com, akpm@linux-foundation.org,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] s390: fix dead defaults for S390_MODULES_SANITY_TEST and S390_UNWIND_SELFTEST
Date: Wed, 29 Apr 2026 22:39:14 +0100 [thread overview]
Message-ID: <b3dba59d-22cc-4404-8876-8fd4e22021b5@gmail.com> (raw)
In-Reply-To: <a3adc8e8-ce4c-458c-a0c8-c0e66078589d-agordeev@linux.ibm.com>
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
prev parent reply other threads:[~2026-04-29 21:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 21:56 [RESEND PATCH] s390: fix dead defaults for S390_MODULES_SANITY_TEST and S390_UNWIND_SELFTEST Julian Braha
2026-04-29 14:42 ` Alexander Gordeev
2026-04-29 21:39 ` 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=b3dba59d-22cc-4404-8876-8fd4e22021b5@gmail.com \
--to=julianbraha@gmail.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=meted@linux.ibm.com \
--cc=svens@linux.ibm.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