diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-10-22 19:06:07 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-10-28 14:31:22 +0200 |
commit | e1dc1bfe5b27842c9e43a1f2d42c34decb0660c3 (patch) | |
tree | 39189589676f0ae13380077caab45f01501356c4 /scripts | |
parent | modpost: disallow *driver to reference .meminit* sections (diff) | |
download | linux-e1dc1bfe5b27842c9e43a1f2d42c34decb0660c3.tar.xz linux-e1dc1bfe5b27842c9e43a1f2d42c34decb0660c3.zip |
modpost: remove more symbol patterns from the section check whitelist
These symbol patterns were whitelisted to allow them to reference to
functions with the old __devinit and __devexit annotations.
We stopped doing this a long time ago, for example, commit 6f039790510f
("Drivers: scsi: remove __dev* attributes.") remove those annotations
from the scsi drivers.
Keep *_ops, *_probe, and *_console, otherwise they will really cause
section mismatch warnings.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 792ba9da0f27..4973b798a469 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -997,13 +997,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, /* symbols in data sections that may refer to any init/exit sections */ if (match(fromsec, PATTERNS(DATA_SECTIONS)) && match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) && - match(fromsym, PATTERNS("*_template", // scsi uses *_template a lot - "*_timer", // arm uses ops structures named _timer a lot - "*_sht", // scsi also used *_sht to some extent - "*_ops", - "*_probe", - "*_probe_one", - "*_console"))) + match(fromsym, PATTERNS("*_ops", "*_probe", "*_console"))) return 0; /* |