summaryrefslogtreecommitdiff
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-11-20 08:56:50 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-11-28 08:46:02 +0900
commit9d98038d438d8515473a75a29bc524e9a4a5882a (patch)
treef605bde4f4fff6ed1ea65b01abd91d45371de517 /scripts/mod/file2alias.c
parentabd20428c3f2f8b97a2a0414343faf0ff246a018 (diff)
modpost: move strstarts() to modpost.h
This macro is useful in file2alias.c as well. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 7f1bbb46dc65..541e6a3f95bc 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1515,7 +1515,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
return;
/* All our symbols are of form __mod_<name>__<identifier>_device_table. */
- if (strncmp(symname, "__mod_", strlen("__mod_")))
+ if (!strstarts(symname, "__mod_"))
return;
name = symname + strlen("__mod_");
namelen = strlen(name);