summaryrefslogtreecommitdiff
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-09-08 21:43:16 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-09-20 09:21:52 +0900
commita16219bdd34777cce35b9b6a704bfbaad28adb72 (patch)
treed221e799e5045aec264139d15d974dc8d65abc95 /scripts/kconfig/symbol.c
parent9a418218dadf913fe78dbe6ad6b2e31e721b84ef (diff)
scripts: move hash function from scripts/kconfig/ to scripts/include/
This function was originally added by commit 8af27e1dc4e4 ("fixdep: use hash table instead of a single array"). Move it to scripts/include/ so that other host programs can use it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r--scripts/kconfig/symbol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 6793f016af5e..6243f0143ecf 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -9,6 +9,7 @@
#include <string.h>
#include <regex.h>
+#include <hash.h>
#include <xalloc.h>
#include "internal.h"
#include "lkc.h"
@@ -893,7 +894,7 @@ struct symbol *sym_lookup(const char *name, int flags)
case 'n': return &symbol_no;
}
}
- hash = strhash(name);
+ hash = hash_str(name);
hash_for_each_possible(sym_hashtable, symbol, node, hash) {
if (symbol->name &&
@@ -936,7 +937,7 @@ struct symbol *sym_find(const char *name)
case 'n': return &symbol_no;
}
}
- hash = strhash(name);
+ hash = hash_str(name);
hash_for_each_possible(sym_hashtable, symbol, node, hash) {
if (symbol->name &&