summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 085abe541280..8cc386346298 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2243,25 +2243,17 @@ static void add_header(struct buffer *b, struct module *mod)
"#endif\n");
buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
buf_printf(b, "};\n");
-}
-static void add_intree_flag(struct buffer *b, int is_intree)
-{
- if (is_intree)
+ if (!external_module)
buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
-}
-/* Cannot check for assembler */
-static void add_retpoline(struct buffer *b)
-{
- buf_printf(b, "\n#ifdef CONFIG_RETPOLINE\n");
- buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n");
- buf_printf(b, "#endif\n");
-}
+ buf_printf(b,
+ "\n"
+ "#ifdef CONFIG_RETPOLINE\n"
+ "MODULE_INFO(retpoline, \"Y\");\n"
+ "#endif\n");
-static void add_staging_flag(struct buffer *b, const char *name)
-{
- if (strstarts(name, "drivers/staging"))
+ if (strstarts(mod->name, "drivers/staging"))
buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n");
}
@@ -2577,9 +2569,6 @@ int main(int argc, char **argv)
check_exports(mod);
add_header(&buf, mod);
- add_intree_flag(&buf, !external_module);
- add_retpoline(&buf);
- add_staging_flag(&buf, mod->name);
add_versions(&buf, mod);
add_depends(&buf, mod);
add_moddevtable(&buf, mod);