Re: [PATCH] Documentation: warn against using int, hex, string options as expressions in Kconfig
From: Julian Braha
Date: Fri Jul 31 2026 - 05:55:39 EST
On 7/31/26 01:25, Nathan Chancellor wrote:
> Drop this quoting of y for clarity?
Sure, I'll send a v2.
>> 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?)
> That said, until either of those potentially happen, this patch seems
> fine.
Thanks for your review!
- Julian Braha