summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorJulian Braha <julianbraha@gmail.com>2026-09-15 22:15:06 +0100
committerNathan Chancellor <nathan@kernel.org>2026-09-17 16:31:00 -0700
commitd13bad83d89d1022fee254c08f6e01084eb4395e (patch)
tree2b85fa9a6c1ad4c7ef23d6c4caafd3ed480c8967 /tools/lib/python/kdoc/python_version.py
parenta5e84d6f6df1fdb64c06fdb64894199aaf5ec899 (diff)
downloadlinux-next-d13bad83d89d1022fee254c08f6e01084eb4395e.tar.gz
linux-next-d13bad83d89d1022fee254c08f6e01084eb4395e.zip
kconfig: check for hex and int mismatches
Using a numeric option of one type (e.g. 'int') to determine the value of a different numeric type (e.g. 'hex') currently fails silently in various ways if attempted, because the underlying string representation is naively reused. Example 1: config I int default -1 config HEX_DEFAULT_INT hex default I Here, HEX_DEFAULT_INT actually gets set to '0x-1', which is of course not a valid hex value. Example 2: config H hex default A config INT_DEFAULT_HEX int default H Here, INT_DEFAULT_HEX actually gets set to 'A', without even converting into the base-10 equivalent of 10. This value, 'A', is otherwise a rejected int value if entered in the frontend, or read in from an existing .config file. These int-hex mismatches currently do not appear anywhere in the tree, so it is already safe to make these error out. Assisted-by: LLM Signed-off-by: Julian Braha <julianbraha@gmail.com> Reviewed-by: Nicolas Schier <n.schier@fritz.com> Link: https://patch.msgid.link/20260915211508.291790-4-julianbraha@gmail.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions