1. 20 Feb, 2024 4 commits
    • Masahiro Yamada's avatar
      kconfig: print recursive dependency errors in the parsed order · cc25cfc5
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <masahiroy@kernel.org>
      cc25cfc5
    • Masahiro Yamada's avatar
      kconfig: do not imply the type of choice value · 7d5f52a4
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <masahiroy@kernel.org>
      7d5f52a4
    • Masahiro Yamada's avatar
      kconfig: convert linked list of files to hash table · 980c9e19
      Masahiro Yamada authored
      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 f094f8a1
      ("kconfig: allow multiple inclusion of the same file") provided a bit
      more flexibility. Of course, it is almost hypothetical...
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      980c9e19
    • Masahiro Yamada's avatar
      kconfig: move strhash() to util.c as a global function · 7c4aa901
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <masahiroy@kernel.org>
      7c4aa901
  2. 19 Feb, 2024 36 commits