From: "Arnd Bergmann" <arnd@arndb.de>
To: "Julian Braha" <julianbraha@gmail.com>,
"Nathan Chancellor" <nathan@kernel.org>
Cc: "Nicolas Schier" <nsc@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
stefan.hengelein@fau.de, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
"Nicolas Pitre" <nico@fluxnic.net>,
officialnaumansabir@gmail.com,
"Randy Dunlap" <rdunlap@infradead.org>,
"Vegard Nossum" <vegard.nossum@oracle.com>,
"Kees Cook" <kees@kernel.org>, "Tejun Heo" <tj@kernel.org>
Subject: Re: [PATCH] Documentation: warn against using int, hex, string options as expressions in Kconfig
Date: Fri, 31 Jul 2026 12:33:13 +0200 [thread overview]
Message-ID: <dd9e809e-82dd-4010-8a26-f7a477e75c47@app.fastmail.com> (raw)
In-Reply-To: <b756801d-873a-4b77-9385-d4a43f7dd28e@gmail.com>
On Fri, Jul 31, 2026, at 11:43, Julian Braha wrote:
> On 7/31/26 01:25, Nathan Chancellor wrote:
>>> This 'if FOO' will always be false, regardless of FOO's value (even when
>>> FOO=1). The same goes for strings and hex.
>> Hmmm, it might be kind of nice to either:
>>
>> 1. Warn about this in Kconfig directly (if possible)
>> 2. Support this usage in Kconfig how one would intuitively expect from
>> either C or Python where symbols with values of 0, 0x0, and '' would
>> be treated as false and every other value set as true.
>
> Agreed, an interpreter change for this is on my roadmap. Though I was
> also considering to make this error out.
>
> Would be good to get some more feedback from others on which approach is
> preferred (Jani, Arnd?)
I'm fine with either of the two approaches, both seem better than
to document the current behavior just to change that again later.
If it's going to cause a hard error, we have to be sure to fix
all existing instances first, otherwise a warning would be better.
Arnd
next prev parent reply other threads:[~2026-07-31 10:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 14:01 [PATCH] Documentation: warn against using int, hex, string options as expressions in Kconfig Julian Braha
2026-07-31 0:25 ` Nathan Chancellor
2026-07-31 9:43 ` Julian Braha
2026-07-31 10:33 ` Arnd Bergmann [this message]
2026-07-31 0:32 ` Randy Dunlap
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=dd9e809e-82dd-4010-8a26-f7a477e75c47@app.fastmail.com \
--to=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=jani.nikula@linux.intel.com \
--cc=julianbraha@gmail.com \
--cc=kees@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nico@fluxnic.net \
--cc=nsc@kernel.org \
--cc=officialnaumansabir@gmail.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=stefan.hengelein@fau.de \
--cc=tj@kernel.org \
--cc=vegard.nossum@oracle.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