modpost: Enable section warning from *driver to .exit.text
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tue, 11 Jun 2024 20:59:00 +0000 (22:59 +0200)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 15 Jul 2024 16:08:37 +0000 (01:08 +0900)
There used to be several offenders, but now that for all of them patches
were sent and most of them were applied, enable the warning also for
builds without W=1.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/modpost.c

index f48d72d22dc2a627994ede651994929ba23c5d97..11731fc621403b7409d9c5e631c02259014d5a2a 100644 (file)
@@ -965,17 +965,6 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
            match(fromsym, PATTERNS("*_ops", "*_probe", "*_console")))
                return 0;
 
-       /*
-        * symbols in data sections must not refer to .exit.*, but there are
-        * quite a few offenders, so hide these unless for W=1 builds until
-        * these are fixed.
-        */
-       if (!extra_warn &&
-           match(fromsec, PATTERNS(DATA_SECTIONS)) &&
-           match(tosec, PATTERNS(ALL_EXIT_SECTIONS)) &&
-           match(fromsym, PATTERNS("*driver")))
-               return 0;
-
        /* Check for pattern 3 */
        if (strstarts(fromsec, ".head.text") &&
            match(tosec, PATTERNS(ALL_INIT_SECTIONS)))