|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4 |
|
| #
cdb1e767 |
| 19-Oct-2024 |
Thorsten Blum <[email protected]> |
kconfig: nconf: Fix typo in function comment
s/handles/handled/
Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
|
|
Revision tags: v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4 |
|
| #
a9d83d74 |
| 12-Aug-2024 |
Masahiro Yamada <[email protected]> |
kbuild: split x*alloc() functions in kconfig to scripts/include/xalloc.h
These functions will be useful for other host programs.
Signed-off-by: Masahiro Yamada <[email protected]>
|
|
Revision tags: v6.11-rc3, v6.11-rc2, v6.11-rc1 |
|
| #
fbaf242c |
| 20-Jul-2024 |
Masahiro Yamada <[email protected]> |
kbuild: move some helper headers from scripts/kconfig/ to scripts/include/
Move array_size.h, hashtable.h, list.h, list_types.h from scripts/kconfig/ to scripts/include/.
These headers will be usef
kbuild: move some helper headers from scripts/kconfig/ to scripts/include/
Move array_size.h, hashtable.h, list.h, list_types.h from scripts/kconfig/ to scripts/include/.
These headers will be useful for other host programs.
Remove scripts/mod/list.h.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5 |
|
| #
bd0db4b6 |
| 18-Jun-2024 |
Masahiro Yamada <[email protected]> |
kconfig: remove sym_get_choice_value()
sym_get_choice_value(menu->sym) is equivalent to sym_calc_choice(menu).
Convert all call sites of sym_get_choice_value() and then remove it.
Signed-off-by: M
kconfig: remove sym_get_choice_value()
sym_get_choice_value(menu->sym) is equivalent to sym_calc_choice(menu).
Convert all call sites of sym_get_choice_value() and then remove it.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc4 |
|
| #
bd988e7c |
| 11-Jun-2024 |
Masahiro Yamada <[email protected]> |
kconfig: introduce choice_set_value() helper
Currently, sym_set_tristate_value() is used to set 'y' to a choice member, which is confusing because it not only sets 'y' to the given symbol but also t
kconfig: introduce choice_set_value() helper
Currently, sym_set_tristate_value() is used to set 'y' to a choice member, which is confusing because it not only sets 'y' to the given symbol but also tweaks flags of other symbols as a side effect.
Add a dedicated function for setting the value of the given choice.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc3, v6.10-rc2 |
|
| #
fde19251 |
| 02-Jun-2024 |
Masahiro Yamada <[email protected]> |
kconfig: remove tristate choice support
I previously submitted a fix for a bug in the choice feature [1], where I mentioned, "Another (much cleaner) approach would be to remove the tristate choice s
kconfig: remove tristate choice support
I previously submitted a fix for a bug in the choice feature [1], where I mentioned, "Another (much cleaner) approach would be to remove the tristate choice support entirely".
There are more issues in the tristate choice feature. For example, you can observe a couple of bugs in the following test code.
[Test Code]
config MODULES def_bool y modules
choice prompt "tristate choice" default A
config A tristate "A"
config B tristate "B"
endchoice
Bug 1: the 'default' property is not correctly processed
'make alldefconfig' produces:
CONFIG_MODULES=y # CONFIG_A is not set # CONFIG_B is not set
However, the correct output should be:
CONFIG_MODULES=y CONFIG_A=y # CONFIG_B is not set
The unit test file, scripts/kconfig/tests/choice/alldef_expected_config, is wrong as well.
Bug 2: choice members never get 'y' with randconfig
For the test code above, the following combinations are possible:
A B (1) y n (2) n y (3) m m (4) m n (5) n m (6) n n
'make randconfig' never produces (1) or (2).
These bugs are fixable, but a more critical problem is the lack of a sensible syntax to specify the default for the tristate choice. The default for the choice must be one of the choice members, which cannot specify any of the patterns (3) through (6) above.
In addition, I have never seen it being used in a useful way.
The following commits removed unnecessary use of tristate choices:
- df8df5e4bc37 ("usb: get rid of 'choice' for legacy gadget drivers") - bfb57ef0544a ("rapidio: remove choice for enumeration")
This commit removes the tristate choice support entirely, which allows me to delete a lot of code, making further refactoring easier.
Note: This includes the revert of commit fa64e5f6a35e ("kconfig/symbol.c: handle choice_values that depend on 'm' symbols"). It was suspicious because it did not address the root cause but introduced inconsistency in visibility between choice members and other symbols.
[1]: https://lore.kernel.org/linux-kbuild/[email protected]/T/#m0a1bb6992581462ceca861b409bb33cb8fd7dbae
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc1, v6.9 |
|
| #
648d82a9 |
| 10-May-2024 |
Masahiro Yamada <[email protected]> |
kconfig: m/nconf: merge two item_add_str() calls
Just trivial cleanups.
Signed-off-by: Masahiro Yamada <[email protected]>
|
| #
cc3e4e5e |
| 10-May-2024 |
Masahiro Yamada <[email protected]> |
kconfig: m/nconf: remove dead code to display value of bool choice
Previously, optional bool choices met the following conditions simultaneously:
- sym_is_choice(sym) - sym_is_changeable(sym) -
kconfig: m/nconf: remove dead code to display value of bool choice
Previously, optional bool choices met the following conditions simultaneously:
- sym_is_choice(sym) - sym_is_changeable(sym) - type == S_BOOLEAN
It no longer occurs since 6a1215888e23 ("kconfig: remove 'optional' property support"). Remove the dead code.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
e89b4615 |
| 10-May-2024 |
Masahiro Yamada <[email protected]> |
kconfig: m/nconf: remove dead code to display children of choice members
This code previously displayed child symbols of the selected choice member.
Since commit 7e3465f63a0a ("kconfig: do not repa
kconfig: m/nconf: remove dead code to display children of choice members
This code previously displayed child symbols of the selected choice member.
Since commit 7e3465f63a0a ("kconfig: do not reparent the menu inside a choice block"), choice members never have child symbols, therefore this is dead code.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3 |
|
| #
4dae9cf5 |
| 02-Feb-2024 |
Masahiro Yamada <[email protected]> |
kconfig: split list_head into a separate header
The struct list_head is often embedded in other structures, while other code is used in C functions.
By separating struct list_head into its own head
kconfig: split list_head into a separate header
The struct list_head is often embedded in other structures, while other code is used in C functions.
By separating struct list_head into its own header, other headers are no longer required to include the entire list.h.
This is similar to the kernel space, where struct list_head is defined in <linux/types.h> instead of <linux/list.h>.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5 |
|
| #
6c07fd84 |
| 03-Dec-2023 |
Masahiro Yamada <[email protected]> |
kconfig: factor out common code shared by mconf and nconf
Separate out the duplicated code to mnconf-common.c.
Signed-off-by: Masahiro Yamada <[email protected]>
|
|
Revision tags: v6.7-rc4, v6.7-rc3 |
|
| #
0df8e970 |
| 24-Nov-2023 |
Masahiro Yamada <[email protected]> |
scripts: clean up IA-64 code
A little more janitorial work after commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture").
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by
scripts: clean up IA-64 code
A little more janitorial work after commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture").
Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6 |
|
| #
1ba67cd3 |
| 09-Aug-2023 |
Jesse Taube <[email protected]> |
kconfig: nconf: Add search jump feature
Menuconfig has a feature where you can "press the key in the (#) prefix to jump directly to that location. You will be returned to the current search results
kconfig: nconf: Add search jump feature
Menuconfig has a feature where you can "press the key in the (#) prefix to jump directly to that location. You will be returned to the current search results after exiting this new menu."
This commit adds this feature to nconfig, with almost identical code.
Signed-off-by: Jesse Taube <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1 |
|
| #
2bbb4861 |
| 01-Jun-2022 |
Isak Ellmer <[email protected]> |
scripts: kconfig: nconf: make nconfig accept jk keybindings
Make nconfig accept jk keybindings for movement in addition to arrow keys.
Signed-off-by: Isak Ellmer <[email protected]> Signed-off-by: M
scripts: kconfig: nconf: make nconfig accept jk keybindings
Make nconfig accept jk keybindings for movement in addition to arrow keys.
Signed-off-by: Isak Ellmer <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8 |
|
| #
8c94b430 |
| 15-Apr-2021 |
Mihai Moldovan <[email protected]> |
kconfig: nconf: stop endless search loops
If the user selects the very first entry in a page and performs a search-up operation, or selects the very last entry in a page and performs a search-down o
kconfig: nconf: stop endless search loops
If the user selects the very first entry in a page and performs a search-up operation, or selects the very last entry in a page and performs a search-down operation that will not succeed (e.g., via [/]asdfzzz[Up Arrow]), nconf will never terminate searching the page.
The reason is that in this case, the starting point will be set to -1 or n, which is then translated into (n - 1) (i.e., the last entry of the page) or 0 (i.e., the first entry of the page) and finally the search begins. This continues to work fine until the index reaches 0 or (n - 1), at which point it will be decremented to -1 or incremented to n, but not checked against the starting point right away. Instead, it's wrapped around to the bottom or top again, after which the starting point check occurs... and naturally fails.
My original implementation added another check for -1 before wrapping the running index variable around, but Masahiro Yamada pointed out that the actual issue is that the comparison point (starting point) exceeds bounds (i.e., the [0,n-1] interval) in the first place and that, instead, the starting point should be fixed.
This has the welcome side-effect of also fixing the case where the starting point was n while searching down, which also lead to an infinite loop.
OTOH, this code is now essentially all his work.
Amazingly, nobody seems to have been hit by this for 11 years - or at the very least nobody bothered to debug and fix this.
Signed-off-by: Mihai Moldovan <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
08718745 |
| 12-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: refactor in print_in_middle()
This helper is the same as the sample code in the NCURSES HOWTO [1], but it is over-engineering to be used for nconf.
I do not see any good reason to u
kconfig: nconf: refactor in print_in_middle()
This helper is the same as the sample code in the NCURSES HOWTO [1], but it is over-engineering to be used for nconf.
I do not see any good reason to use the 'float' type just for the division by 2.
All the call-sites pass a non-NULL pointer to the first argument, so 'if (win == NULL) win = stdscr;' is dead code.
'if (startx != 0) x = startx;' is dead code because 'x' will be overridden some lines below, by 'x = startx + (int)temp;'.
All the call-sites pass a non-zero value to the second argument, so 'if (starty != 0)' is always true.
getyx(win, y, x) is also dead-code because both 'y' and 'x' are overridden.
All the call-sites pass 0 to the third parameter, so 'startx' can be removed.
All the call-sites pass a non-zero value to the fourth parameter, so 'if (width == 0) width = 80;' is dead code.
The window will be refreshed later, so there is no need to call refresh() in this function.
Change the type of the last parameter from 'chtype' to 'int' to be aligned with the prototype, 'int wattrset(WINDOW *win, int attrs);'
I also slightly cleaned up the indentation style.
[1]: https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
0a94768c |
| 12-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: remove meaningless wattrset() call from show_menu()
This attribute is not used because it will be overridden some lines below:
wattrset(main_window, attr_main_menu_box);
Signed-o
kconfig: nconf: remove meaningless wattrset() call from show_menu()
This attribute is not used because it will be overridden some lines below:
wattrset(main_window, attr_main_menu_box);
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
ecdb733f |
| 12-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: change set_config_filename() to void function
No one uses the return value of this function.
Signed-off-by: Masahiro Yamada <[email protected]>
|
|
Revision tags: v5.12-rc7 |
|
| #
93487b17 |
| 10-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: refactor attributes setup code
The current attributes setup code is strange; the array attribute[] is set to values outside the range of the attribute_t enum.
At least,
attribute
kconfig: nconf: refactor attributes setup code
The current attributes setup code is strange; the array attribute[] is set to values outside the range of the attribute_t enum.
At least,
attributes_t attributes[ATTR_MAX+1] = {0};
... should be
int attribute[ATTR_MAX+1] = {0};
Also, there is no need to hard-code the color-pair numbers in attributes_t.
The current code is messy. Rewrite it.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
16b0e102 |
| 10-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: remove unneeded default for menu prompt
The rootmenu always has a prompt even if the 'mainmenu' statement is missing in the top Kconfig file.
conf_parse() calls menu_add_prompt(P_ME
kconfig: nconf: remove unneeded default for menu prompt
The rootmenu always has a prompt even if the 'mainmenu' statement is missing in the top Kconfig file.
conf_parse() calls menu_add_prompt(P_MENU, "Main menu", NULL) in this case.
So, every 'menu' has a prompt.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
2ba50da9 |
| 10-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: get rid of (void) casts from wattrset() calls
This reverts commit 10175ba65fde ("nconfig: Silence unused return values from wattrset").
With this patch applied, recent GCC versions
kconfig: nconf: get rid of (void) casts from wattrset() calls
This reverts commit 10175ba65fde ("nconfig: Silence unused return values from wattrset").
With this patch applied, recent GCC versions can cleanly build nconf without "value computed is not used" warnings.
The wattrset() used to be implemented as a macro, like this:
#define wattrset(win,at) \ (NCURSES_OK_ADDR(win) \ ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \ OK) \ : ERR)
The GCC bugzilla [1] reported a false-positive -Wunused-value warning in a similar test case. It was fixed by GCC 4.4.1.
Let's revert that commit, and see if somebody will claim the issue.
[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
68876c38 |
| 10-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: mconf,nconf: remove unneeded '\0' termination after snprintf()
snprintf() always terminates the destination buffer with '\0' even if the buffer is not long enough. (In this case, the last e
kconfig: mconf,nconf: remove unneeded '\0' termination after snprintf()
snprintf() always terminates the destination buffer with '\0' even if the buffer is not long enough. (In this case, the last element of the buffer becomes '\0'.)
The explicit termination is unneeded.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
5ee54659 |
| 10-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: change sym_change_count to a boolean flag
sym_change_count has no good reason to be 'int' type.
sym_set_change_count() compares the old and new values after casting both of them to (bool).
kconfig: change sym_change_count to a boolean flag
sym_change_count has no good reason to be 'int' type.
sym_set_change_count() compares the old and new values after casting both of them to (bool). I do not see any practical diffrence between sym_set_change_count(1) and sym_add_change_count(1).
Use the boolean flag, conf_changed.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
| #
1f035a52 |
| 10-Apr-2021 |
Masahiro Yamada <[email protected]> |
kconfig: nconf: fix core dump when searching in empty menu
The following code in get_mext_match():
index = (index + items_num) % items_num;
... makes the program crash when items_num is zero (th
kconfig: nconf: fix core dump when searching in empty menu
The following code in get_mext_match():
index = (index + items_num) % items_num;
... makes the program crash when items_num is zero (that is, the menu is empty).
A menu can be empty when all the options in it are hidden by unmet 'depends on'.
For example,
menu "This menu will be empty"
config FOO bool "foo" depends on BROKEN
endmenu
If you visit this menu and press a '/' key and then another key, nconf crashes with:
Floating point exception (core dumped)
When the number of items is zero, it does not make sense to search in the menu. In this case, current_item() returns NULL, and item_index() ERR, but get_mext_match() does not check it.
Let's make get_mext_match() just return if the menu is empty.
While I am here, change items_num from 'int' to 'unsigned int' because it should never become negative.
Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4 |
|
| #
163e0c27 |
| 31-Aug-2020 |
Denis Efremov <[email protected]> |
kconfig: remove redundant assignment prompt = prompt
Semi-automatic removing of localization macros changed the line from "prompt = _(prompt);" to "prompt = prompt;". Drop the reduntand assignment.
kconfig: remove redundant assignment prompt = prompt
Semi-automatic removing of localization macros changed the line from "prompt = _(prompt);" to "prompt = prompt;". Drop the reduntand assignment.
Fixes: 694c49a7c01c ("kconfig: drop localization support") Signed-off-by: Denis Efremov <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|