Re: [PATCH] kconfig: reject malformed KCONFIG_PROBABILITY values
From: Dmitrii Tulnov
Date: Tue Sep 08 2026 - 17:10:12 EST
Hi Julian,
Thank you for the review and for the welcome.
> It would be good to note here that 'KCONFIG_PROBABILITY=50' (without
> the '%') should be 25:25:50 instead.
You're right. The v2 commit message now states explicitly that
KCONFIG_PROBABILITY=50 gives tristate y/m/n probabilities of 25%/25%/50%.
The regression test compares the equivalent inputs 50 and 50:25:25 across
20 fixed seeds.
> I disagree with allowing the leading whitespace and sign.
Agreed. Leading whitespace and signs are now warning-only because they are
accepted by strtol() but outside Kconfig's documented XX:XX:XX format.
> I would prefer to make this a warning for now, and then promote this to an
> error later assuming nobody complains.
The v2 implementation warns about malformed syntax while retaining the
existing parsing behavior for compatibility. Numeric range violations remain
errors.
Thank you again for taking the time to review this.
Best regards,
Dmitrii