From: Masahiro Yamada Date: Fri, 28 Sep 2018 06:21:55 +0000 (+0900) Subject: modpost: remove leftover symbol prefix handling for module device table X-Git-Tag: v5.15~7710^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=153e04b373dd5a4fdb841a727e47c40b1ad10ffc;p=platform%2Fkernel%2Flinux-starfive.git modpost: remove leftover symbol prefix handling for module device table Blackfin and metag were the only architectures that prefix symbols with an underscore. They were removed by commit 4ba66a976072 ("arch: remove blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), respectively. It is no longer necessary to handle part of module device table symbols. Signed-off-by: Masahiro Yamada --- diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 7be4369..ba4ebc4 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) return; - /* All our symbols are of form __mod____device_table. */ - name = strstr(symname, "__mod_"); - if (!name) + /* All our symbols are of form __mod____device_table. */ + if (strncmp(symname, "__mod_", strlen("__mod_"))) return; - name += strlen("__mod_"); + name = symname + strlen("__mod_"); namelen = strlen(name); if (namelen < strlen("_device_table")) return;