From ef84e87362aba3913f86a46ab534da59773dd817 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Tue, 1 Dec 2020 16:52:22 +0000 Subject: [PATCH] UPSTREAM: 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. Acked-by: Greg Kroah-Hartman Reviewed-by: Matthias Maennich Signed-off-by: Quentin Perret Signed-off-by: Masahiro Yamada Bug: 176428324 Change-Id: I0084ff44b38e68ac2e2ed1818a7cc1bd09cfb58c (cherry picked from commit b9ed847b5ae69e0f2e685f9d53e2dd94c0db751e) Signed-off-by: Melody Olvera --- scripts/mod/modpost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 584beca14e3f..d493c5c3f965 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2645,9 +2645,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)); } }