modpost: turn static exports into error
PATCH v2 1/1 modpost: turn static exports into error
Using EXPORT_SYMBOL*() on static functions is fundamentally wrong. Modpost currently reports that as a warning, but clearly this is not a pattern we should allow, and all in-tree occurences should have been fixed by now. So, promote the warn() message to error() to make sure this never happens again.
---
v2: now depends on [email protected]
--- scripts/mod/modpost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/mod/modpost.c +3 -3
@@ -2648,9 +2648,9 @@ int main(int argc, char **argv)for (s = symbolhash[n]; s; s = s->next) {if (s->is_static) -warn ("\"%s\" [%s] is a static %s\n" , - s->name, s->module->name, -export_str (s->export)); +error ("\"%s\" [%s] is a static %s\n" , + s->name, s->module->name, +export_str (s->export)); } }
Signature · 1 line
2.29.2.454.gaff20da3a2-goog
Quoted 7 lines · Quentin Perret
Using EXPORT_SYMBOL*() on static functions is fundamentally wrong. Modpost currently reports that as a warning, but clearly this is not a pattern we should allow, and all in-tree occurences should have been fixed by now. So, promote the
warn()message toerror()to make sure this never happens again.
Quoted 6 lines
Reviewed-by Matthias Maennich <[email protected]>Signed-off-by Quentin Perret <[email protected]>---
v2: now depends on [email protected]
Applied to linux-kbuild. Thanks.
Quoted 24 lines
--- scripts/mod/modpost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)scripts/mod/modpost.c +3
-4@@ -2648,9 +2648,9 @@ int main(int argc, char **argv)for (s = symbolhash[n]; s; s = s->next) {if (s->is_static) -warn ("\"%s\" [%s] is a static %s\n" , - s->name, s->module->name, -export_str (s->export)); +error ("\"%s\" [%s] is a static %s\n" , + s->name, s->module->name, +export_str (s->export)); } } --2.29.2.454.gaff20da3a2-goog
Signature · 2 lines
Best Regards Masahiro Yamada