Commit 4cae77ac authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: retrieve the module dependency and CRCs in check_exports()

Do not repeat the similar code.

It is simpler to do this in check_exports() instead of add_versions().
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 23beb44a
...@@ -2159,6 +2159,11 @@ static void check_exports(struct module *mod) ...@@ -2159,6 +2159,11 @@ static void check_exports(struct module *mod)
s->name, mod->name); s->name, mod->name);
continue; continue;
} }
s->module = exp->module;
s->crc_valid = exp->crc_valid;
s->crc = exp->crc;
basename = strrchr(mod->name, '/'); basename = strrchr(mod->name, '/');
if (basename) if (basename)
basename++; basename++;
...@@ -2251,16 +2256,7 @@ static void add_staging_flag(struct buffer *b, const char *name) ...@@ -2251,16 +2256,7 @@ static void add_staging_flag(struct buffer *b, const char *name)
**/ **/
static void add_versions(struct buffer *b, struct module *mod) static void add_versions(struct buffer *b, struct module *mod)
{ {
struct symbol *s, *exp; struct symbol *s;
for (s = mod->unres; s; s = s->next) {
exp = find_symbol(s->name);
if (!exp || exp->module == mod)
continue;
s->module = exp->module;
s->crc_valid = exp->crc_valid;
s->crc = exp->crc;
}
if (!modversions) if (!modversions)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment