summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kconfig: tests: support KCONFIG_SEED for the randconfig runnerMasahiro Yamada2024-03-211-6/+10
| | | | | | This will help get consistent results for randconfig tests. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kbuild: rpm-pkg: add dtb files in kernel rpmJose Ignacio Tornos Martinez2024-03-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | Some architectures, like aarch64 ones, need a dtb file to configure the hardware. The default dtb file can be preloaded from u-boot, but the final and/or more complete dtb file needs to be able to be loaded later from rootfs. Add the possible dtb files to the kernel rpm and mimic Fedora shipping process, storing the dtb files in the module directory. These dtb files will be copied to /boot directory by the install scripts, but add fallback just in case, checking if the content in /boot directory is correct. Mark the files installed to /boot as %ghost to make sure they will be removed when the package is uninstalled. Tested with Fedora Rawhide (x86_64 and aarch64) with dnf and rpm tools. In addition, fallback was also tested after modifying the install scripts. Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com> Tested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: remove unneeded menu_is_visible() call in conf_write_defconfig()Masahiro Yamada2024-03-191-4/+1
| | | | | | | | | | | When the condition 'sym == NULL' is met, the code will reach the 'next_menu' label regardless of the return value from menu_is_visible(). menu_is_visible() calculates some symbol values as a side-effect, for instance by calling expr_calc_value(menu->visibility), but all the symbol values will be calculated eventually. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: check prompt for choice while parsingMasahiro Yamada2024-03-192-3/+6
| | | | | | This can be checked on-the-fly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: lxdialog: remove unused dialog colorsMasahiro Yamada2024-03-192-22/+0
| | | | | | | Remove inputbox_order, searchbox, searchbox_title, searchbox_border because they are initialized, but not used anywhere. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: lxdialog: fix button color for blackbg themeMasahiro Yamada2024-03-191-1/+1
| | | | | | | | | For MENUCONFIG_COLOR=blackbg, the text in inactive buttons is invisible because both the foreground and background are black. Change the foreground color to white and remove the highlighting. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* modpost: fix null pointer dereferenceMax Kellermann2024-03-191-1/+3
| | | | | | | | | | | | | | | | | If the find_fromsym() call fails and returns NULL, the warn() call will dereference this NULL pointer and cause the program to crash. This happened when I tried to build with "test_user_copy" module. With this fix, it prints lots of warnings like this: WARNING: modpost: lib/test_user_copy: section mismatch in reference: (unknown)+0x4 (section: .text.fixup) -> (unknown) (section: .init.text) masahiroy@kernel.org: The issue is reproduced with ARCH=arm allnoconfig + CONFIG_MODULES=y + CONFIG_RUNTIME_TESTING_MENU=y + CONFIG_TEST_USER_COPY=m Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kbuild: remove GCC's default -Wpacked-bitfield-compat flagMasahiro Yamada2024-03-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4a5838ad9d2d ("kbuild: Add extra gcc checks") added the -Wpacked-bitfield-compat flag, but there is no need to add it explicitly. GCC manual says: "This warning is enabled by default. Use -Wno-packed-bitfield-compat to disable this warning." The test code in the manual: struct foo { char a:4; char b:8; } __attribute__ ((packed)); ... emits "note: offset of packed bit-field ‘b’ has changed in GCC 4.4" without W=3. Let's remove it, as it is a default with GCC. Clang does not support this flag, so its removal will not affect Clang builds. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
* kbuild: unexport abs_srctree and abs_objtreeMasahiro Yamada2024-03-104-6/+6
| | | | | | | | | | | | | | | | | Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory") exported abs_srctree and abs_objtree to avoid recomputation after the sub-make. However, this approach turned out to be fragile. Commit 5fa94ceb793e ("kbuild: set correct abs_srctree and abs_objtree for package builds") moved them above "ifneq ($(sub_make_done),1)", eliminating the need for exporting them. These are only needed in the top Makefile. If an absolute path is required in sub-directories, you can use $(abspath ) or $(realpath ) as needed. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
* kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1Nathan Chancellor2024-03-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang enables -Wenum-enum-conversion and -Wenum-compare-conditional under -Wenum-conversion. A recent change in Clang strengthened these warnings and they appear frequently in common builds, primarily due to several instances in common headers but there are quite a few drivers that have individual instances as well. include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:955:24: warning: conditional expression between different enumeration types ('enum iwl_mac_beacon_flags' and 'enum iwl_mac_beacon_flags_v1') [-Wenum-compare-conditional] 955 | flags |= is_new_rate ? IWL_MAC_BEACON_CCK | ^ ~~~~~~~~~~~~~~~~~~ 956 | : IWL_MAC_BEACON_CCK_V1; | ~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:1120:21: warning: conditional expression between different enumeration types ('enum iwl_mac_beacon_flags' and 'enum iwl_mac_beacon_flags_v1') [-Wenum-compare-conditional] 1120 | 0) > 10 ? | ^ 1121 | IWL_MAC_BEACON_FILS : | ~~~~~~~~~~~~~~~~~~~ 1122 | IWL_MAC_BEACON_FILS_V1; | ~~~~~~~~~~~~~~~~~~~~~~ Doing arithmetic between or returning two different types of enums could be a bug, so each of the instance of the warning needs to be evaluated. Unfortunately, as mentioned above, there are many instances of this warning in many different configurations, which can break the build when CONFIG_WERROR is enabled. To avoid introducing new instances of the warnings while cleaning up the disruption for the majority of users, disable these warnings for the default build while leaving them on for W=1 builds. Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/2002 Link: https://github.com/llvm/llvm-project/commit/8c2ae42b3e1c6aa7c18f873edcebff7c0b45a37e Acked-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: remove named choice supportMasahiro Yamada2024-03-102-12/+4
| | | | | | | | | | | | Commit 5a1aa8a1aff6 ("kconfig: add named choice group") did not provide enough explanation regarding its benefits. A use case was found in another project [1] sometime later, this feature has never been used in the kernel. [1]: https://lore.kernel.org/all/201012150034.01356.yann.morin.1998@anciens.enib.fr/ Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
* kconfig: use linked list in get_symbol_str() to iterate over menusMasahiro Yamada2024-03-091-8/+9
| | | | | | | | | | | Currently, get_symbol_str() uses a tricky approach to traverse the associated menus. With relevant menus now linked to the symbol using a linked list, use list_for_each_entry() for iterating on the menus. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
* kconfig: link menus to a symbolMasahiro Yamada2024-03-093-1/+12
| | | | | | | | | | | | | Currently, there is no direct link from (struct symbol) to (struct menu). It is still possible to access associated menus through the P_SYMBOL property, because property::menu is the relevant menu entry, but it results in complex code, as seen in get_symbol_str(). Use a linked list for simpler traversal of relevant menus. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
* kbuild: fix inconsistent indentation in top MakefileMasahiro Yamada2024-03-091-16/+16
| | | | | | | | | | | | | Commit 3b9ab248bc45 ("kbuild: use 4-space indentation when followed by conditionals") introduced inconsistent indentation because it deliberately touched only the conditional directives to minimize the change set. This commit reformats some blocks in the top Makefile so they are consistently indented with 4 spaces. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
* kbuild: Use -fmin-function-alignment when availablePetr Pavlu2024-02-253-5/+24
| | | | | | | | | | | | | | | | | | | | | | GCC recently added option -fmin-function-alignment, which should appear in GCC 14. Unlike -falign-functions, this option causes all functions to be aligned at the specified value, including the cold ones. In particular, when an arm64 kernel is built with DYNAMIC_FTRACE_WITH_CALL_OPS=y, the 8-byte function alignment is required for correct functionality. This was done by -falign-functions=8 and having workarounds in the kernel to force the compiler to follow this alignment. The new -fmin-function-alignment option directly guarantees it. Detect availability of -fmin-function-alignment and use it instead of -falign-functions when present. Introduce CC_HAS_SANE_FUNCTION_ALIGNMENT and enable __cold to work as expected when it is set. Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* alpha: merge two entries for CONFIG_ALPHA_GAMMAMasahiro Yamada2024-02-231-7/+3
| | | | | | | There are two entries for CONFIG_ALPHA_GAMMA, with the second one 7 lines below. Merge them together. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* alpha: merge two entries for CONFIG_ALPHA_EV4Masahiro Yamada2024-02-231-4/+1
| | | | | | | There are two entries for CONFIG_ALPHA_EV4, on line 337 and line 368. Merge them together. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kbuild: change DTC_FLAGS_<basetarget>.o to take the path relative to $(obj)Masahiro Yamada2024-02-231-1/+1
| | | | | | | | For the same rationale as commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)"). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
* kbuild: change tool coverage variables to take the path relative to $(obj)Masahiro Yamada2024-02-234-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)") changed the syntax of per-file compiler flags. The situation is the same for the following variables: OBJECT_FILES_NON_STANDARD_<basetarget>.o GCOV_PROFILE_<basetarget>.o KASAN_SANITIZE_<basetarget>.o KMSAN_SANITIZE_<basetarget>.o KMSAN_ENABLE_CHECKS_<basetarget>.o UBSAN_SANITIZE_<basetarget>.o KCOV_INSTRUMENT_<basetarget>.o KCSAN_SANITIZE_<basetarget>.o KCSAN_INSTRUMENT_BARRIERS_<basetarget>.o The <basetarget> is the filename of the target with its directory and suffix stripped. This syntax comes into a trouble when two files with the same basename appear in one Makefile, for example: obj-y += dir1/foo.o obj-y += dir2/foo.o OBJECT_FILES_NON_STANDARD_foo.o := y OBJECT_FILES_NON_STANDARD_foo.o is applied to both dir1/foo.o and dir2/foo.o. This syntax is not flexbile enough to handle cases where one of them is a standard object, but the other is not. It is more sensible to use the relative path to the Makefile, like this: obj-y += dir1/foo.o OBJECT_FILES_NON_STANDARD_dir1/foo.o := y obj-y += dir2/foo.o OBJECT_FILES_NON_STANDARD_dir2/foo.o := y To maintain the current behavior, I made adjustments to the following two Makefiles: - arch/x86/entry/vdso/Makefile, which compiles vclock_gettime.o, vgetcpu.o, and their vdso32 variants. - arch/x86/kvm/Makefile, which compiles vmx/vmenter.o and svm/vmenter.o Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Acked-by: Sean Christopherson <seanjc@google.com>
* kconfig: lxdialog: fix cursor render in checklistMatthew Bystrin2024-02-201-3/+2
| | | | | | | | | | | | | | When a checklist is opened, the cursor is rendered in a wrong position (after the last list element on the screen). You can observe it by opening any checklist in menuconfig. Added wmove() to set the cursor in the proper position, just like in menubox.c. Removed wnoutrefresh(dialog) because dialog window has already been updated in print_buttons(). Replaced wnoutrefresh(list) and doupdate() calls with one wrefresh(list) call. Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kbuild: remove EXPERT and !COMPILE_TEST guarding from TRIM_UNUSED_KSYMSMasahiro Yamada2024-02-201-2/+1
| | | | | | | | | | | | This reverts the following two commits: - a555bdd0c58c ("Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding") - 5cf0fd591f2e ("Kbuild: disable TRIM_UNUSED_KSYMS option") Commit 5e9e95cc9148 ("kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion") solved the build time issue. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* hexagon: select GENERIC_IRQ_PROBE instead of redefining itMasahiro Yamada2024-02-201-6/+1
| | | | | | | | Select GENERIC_IRQ_PROBE, as the other architectures do. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Brian Cain <bcain@quicinc.com>
* hexagon: select FRAME_POINTER instead of redefining itMasahiro Yamada2024-02-201-3/+2
| | | | | | | | | | | | Because FRAME_POINTER is defined in lib/Kconfig.debug, the arch Kconfig should select it. Add 'select FRAME_POINTER' to HEXAGON. ARCH_WANT_FRAME_POINTERS must also be selected to avoid the unmet dependency warning. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Brian Cain <bcain@quicinc.com>
* treewide: replace or remove redundant def_bool in Kconfig filesMasahiro Yamada2024-02-2011-15/+11
| | | | | | | | | 'def_bool X' is a shorthand for 'bool' plus 'default X'. 'def_bool' is redundant where 'bool' is already present, so 'def_bool X' can be replaced with 'default X', or removed if X is 'n'. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: use generic macros to implement symbol hashtableMasahiro Yamada2024-02-207-39/+42
| | | | | | | | Use helper macros in hashtable.h for generic hashtable implementation. We can git rid of the hash head index of for_all_symbols(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: print recursive dependency errors in the parsed orderMasahiro Yamada2024-02-202-15/+27
| | | | | | | | | | | | | | for_all_symbols() iterates in the symbol hash table. The order of iteration depends on the hash table implementation. If you use it for printing errors, they are shown in random order. For example, the order of following test input and the corresponding error do not match: - scripts/kconfig/tests/err_recursive_dep/Kconfig - scripts/kconfig/tests/err_recursive_dep/expected_stderr Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: do not imply the type of choice valueMasahiro Yamada2024-02-201-6/+0
| | | | | | | | | | Do not feed back the choice type to choice values. Each choice value should explicitly specify 'bool' or 'tristate', as all the Kconfig files already do. If the type were missing, "config symbol defined without type" would be shown. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: convert linked list of files to hash tableMasahiro Yamada2024-02-201-9/+11
| | | | | | | | | | | | | | | | | | | Currently, a linked list is used to keep track of all the Kconfig files that have ever been parsed. Every time the "source" statement is encountered, the linked list is traversed to check if the file has been opened before. This prevents the same file from being recorded in include/config/auto.conf.cmd again. Given 1500+ Kconfig files parsed, a hashtable is now a more optimal data structure. By the way, you may wonder why we check this in the first place. It matters only when the same file is included multiple times. In old days, such a use case was forbidden, but commit f094f8a1b273 ("kconfig: allow multiple inclusion of the same file") provided a bit more flexibility. Of course, it is almost hypothetical... Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: move strhash() to util.c as a global functionMasahiro Yamada2024-02-203-9/+11
| | | | | | | Remove the 'static' qualifier from strhash() so that it can be accessed from other files. Move it to util.c, which is a more appropriate location. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: move ARRAY_SIZE to a headerMasahiro Yamada2024-02-192-2/+12
| | | | | | | To use ARRAY_SIZE from other files, move it to its own header, just like include/linux/array_size.h. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: add macros useful for hashtableMasahiro Yamada2024-02-191-0/+48
| | | | | | | This is similar to include/linux/hashtable.h, but the implementation has been simplified. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: import more list macros and inline functionsMasahiro Yamada2024-02-192-0/+77
| | | | | | | Import more macros and inline functions from include/linux/list.h and include/linux/types.h. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: resync list.hMasahiro Yamada2024-02-191-62/+121
| | | | | | | | | | Update the existing macros and inline functions based on include/linux/list.h. The variable name '_new' can be reverted to 'new' because this header is no longer included from the C++ file, scripts/kconfig/qconf.cc. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: split list_head into a separate headerMasahiro Yamada2024-02-196-7/+15
| | | | | | | | | | | | | 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 <masahiroy@kernel.org>
* kconfig: change file_lookup() to return the file nameMasahiro Yamada2024-02-195-16/+13
| | | | | | | | | | | | Currently, file_lookup() returns a pointer to (struct file), but the callers use only file->name. Make it return the ->name member directly. This adjustment encapsulates struct file and file_list as internal implementation. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: make file::name a flexible array memberMasahiro Yamada2024-02-192-3/+6
| | | | | | Call malloc() just once to allocate needed memory. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: move the file and lineno in struct file to struct bufferMasahiro Yamada2024-02-193-33/+23
| | | | | | | | | | | | | | struct file has two link nodes, 'next' and 'parent'. The former is used to link files in the 'file_list' linked list, which manages the list of Kconfig files seen so far. The latter is used to link files in the 'current_file' linked list, which manages the inclusion ("source") tree. The latter should be tracked together with the lexer state. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: replace remaining current_file->name with cur_filenameMasahiro Yamada2024-02-192-6/+6
| | | | | | Replace the remaining current_file->name in the lexer context. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: do not delay the cur_filename updateMasahiro Yamada2024-02-192-10/+15
| | | | | | | | Currently, cur_filename is updated at the first token of each statement. However, this seems unnecessary based on my understanding; the parser can use the same variable as the lexer tracks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: replace file->name with name in zconf_nextfile()Masahiro Yamada2024-02-191-5/+5
| | | | | | The 'file->name' and 'name' are the same in this function. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: associate struct property with file name directlyMasahiro Yamada2024-02-193-9/+9
| | | | | | | | | struct property is linked to struct file for diagnostic purposes. It is always used to retrieve the file name through prop->file->name. Associate struct property with the file name directly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: associate struct menu with file name directlyMasahiro Yamada2024-02-195-10/+10
| | | | | | | | | struct menu is linked to struct file for diagnostic purposes. It is always used to retrieve the file name through menu->file->name. Associate struct menu with the file name directly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: remove zconf_curname() and zconf_lineno()Masahiro Yamada2024-02-195-51/+37
| | | | | | | | | | Now zconf_curname() and zconf_lineno() are so simple that they just return cur_filename, cur_lineno, respectively. Remove these functions, and then use cur_filename and cur_lineno directly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: replace current_pos with separate cur_{filename,lineno}Masahiro Yamada2024-02-191-8/+17
| | | | | | | | | | | | | | | | Replace current_pos with separate variables representing the file name and the line number, respectively. No functional change is intended. By the way, you might wonder why the "<none>" fallback exists in zconf_curname(). menu_add_symbol() saves the current file and the line number. It is intended to be called only during the yyparse() time. However, menu_finalize() calls it, where there is no file being parsed. This is a long-standing hack that should be fixed later. I left a FIXME comment. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: split preprocessor prototypes into preprocess.hMasahiro Yamada2024-02-195-13/+23
| | | | | | | These are needed only for the parse stage. Move the prototypes into a separate header to make sure they are not used after that. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: call env_write_dep() right after yyparse()Masahiro Yamada2024-02-194-12/+18
| | | | | | | | This allows preprocess.c to free up all of its resources when the parse stage is finished. It also ensures conf_write_autoconf_cmd() produces consistent results even if called multiple times for any reason. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: write Kconfig files to autoconf.cmd in orderMasahiro Yamada2024-02-194-4/+11
| | | | | | | | | | Currently, include/config/autoconf.cmd saves included Kconfig files in reverse order. While this is not a big deal, it is inconsistent with other *.cmd files generated by fixdep. Output the included Kconfig files in the included order. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: remove unneeded sym_find() call in conf_parse()Masahiro Yamada2024-02-191-1/+1
| | | | | | sym_find("n") is equivalent to &symbol_no. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: remove compat_getline()Masahiro Yamada2024-02-191-52/+1
| | | | | | | | | | | | | | Commit 1a7a8c6fd8ca ("kconfig: allow long lines in config file") added a self-implemented getline() for better portability. However, getline() is standardized [1] and already used in other programs such as scripts/kallsyms.c. Use getline() provided by libc. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getdelim.html Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* kconfig: remove orphan lookup_file() declarationMasahiro Yamada2024-02-191-1/+0
| | | | | | There is no definition, no caller for lookup_file(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>