Skip to content

kconfig: error on reverse range

Julian Braha linux-kbuild lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- fix typo in commit message: where -> there (Nicolas)
- adjust warning and error printing to match gcc (Nicolas)
- handle case with multiple (conditional) ranges (sashiko)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kconfig: add prop_err function to simplify property error handlingscripts/kconfig/menu.c scripts/kconfig/tests/err_transitional/expected_stderr+18 -110 replies
2/2kconfig: error on reverse rangescripts/kconfig/menu.c scripts/kconfig/tests/err_num_reverse_range/Kconfig scripts/kconfig/tests/err_num_reverse_range/__init__.py +1 more+148 -40 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNathan Chancellor
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] kconfig: error on reverse range

This series adds more input validation to Kconfig, specifically checking that ranges for numeric options are properly ordered. This check was originally introduced as part of kconfirm [1], but there are no findings for this across the tree, so the check can be added directly into Kconfig.

Patch 1/2 adds a prop_err() function to match the existing prop_warn(), which is then used in patch 2/2 where the check is introduced.

[1] https://lore.kernel.org/all/20260904220559.GB2787252@ax162/
---
Changes since v1:
- fix typo in commit message: where -> there (Nicolas)
- adjust warning and error printing to match gcc (Nicolas)
- handle case with multiple (conditional) ranges (sashiko)

Link to v1:
https://lore.kernel.org/linux-kbuild/[email protected]/
---
Julian Braha (2):
kconfig: add prop_err function to simplify property error handling
kconfig: error on reverse range

 scripts/kconfig/menu.c                        |  49 +++++---
 .../tests/err_num_reverse_range/Kconfig       | 111 ++++++++++++++++++
 .../tests/err_num_reverse_range/__init__.py   |   8 ++
 .../err_num_reverse_range/expected_stderr     |  11 ++
 .../tests/err_transitional/expected_stderr    |   2 +-
 5 files changed, 166 insertions(+), 15 deletions(-)
 create mode 100644 scripts/kconfig/tests/err_num_reverse_range/Kconfig
 create mode 100644 scripts/kconfig/tests/err_num_reverse_range/__init__.py
 create mode 100644 scripts/kconfig/tests/err_num_reverse_range/expected_stderr
Signature · 1 line
2.55.0