]> git.itanic.dy.fi Git - linux-stable/commitdiff
modpost: remove EXIT_SECTIONS macro
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 22 Oct 2023 17:06:09 +0000 (02:06 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 28 Oct 2023 12:31:22 +0000 (21:31 +0900)
ALL_EXIT_SECTIONS and EXIT_SECTIONS are the same. Remove the latter.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/modpost.c

index 54621a4bd421779a131acf56adbcab94427b174a..160336efedba70e0756f2d1ff879a841cbd5a5e4 100644 (file)
@@ -808,7 +808,7 @@ static void check_section(const char *modname, struct elf_info *elf,
 #define ALL_XXXINIT_SECTIONS ".meminit.*"
 
 #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
-#define ALL_EXIT_SECTIONS EXIT_SECTIONS
+#define ALL_EXIT_SECTIONS ".exit.*"
 
 #define DATA_SECTIONS ".data", ".data.rel"
 #define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
@@ -819,8 +819,6 @@ static void check_section(const char *modname, struct elf_info *elf,
 
 #define INIT_SECTIONS      ".init.*"
 
-#define EXIT_SECTIONS      ".exit.*"
-
 #define ALL_TEXT_SECTIONS  ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \
                TEXT_SECTIONS, OTHER_TEXT_SECTIONS
 
@@ -1006,7 +1004,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
         */
        if (!extra_warn &&
            match(fromsec, PATTERNS(DATA_SECTIONS)) &&
-           match(tosec, PATTERNS(EXIT_SECTIONS)) &&
+           match(tosec, PATTERNS(ALL_EXIT_SECTIONS)) &&
            match(fromsym, PATTERNS("*driver")))
                return 0;
 
@@ -1169,7 +1167,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,
        if (match(secname, PATTERNS(INIT_SECTIONS)))
                warn("%s: %s: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.\n",
                     mod->name, name);
-       else if (match(secname, PATTERNS(EXIT_SECTIONS)))
+       else if (match(secname, PATTERNS(ALL_EXIT_SECTIONS)))
                warn("%s: %s: EXPORT_SYMBOL used for exit symbol. Remove __exit or EXPORT_SYMBOL.\n",
                     mod->name, name);
 }