modpost: add mod->is_vmlinux struct member

is_vmlinux() is called in several places to check whether the current
module is vmlinux or not.

It is faster and clearer to check mod->is_vmlinux flag.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada 2020-06-01 14:57:26 +09:00
parent 1be5fa6c94
commit 5a438af9db
2 changed files with 11 additions and 9 deletions

View file

@ -120,6 +120,7 @@ struct module {
int gpl_compatible;
struct symbol *unres;
int from_dump; /* 1 if module was loaded from *.symvers */
int is_vmlinux;
int seen;
int skip;
int has_init;