mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
FROMLIST: modpost: Make static exports fatal
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 fatal() to make sure this never happens again. Bug: 174214891 Link: https://lore.kernel.org/lkml/20201124182420.2202514-1-qperret@google.com/ Signed-off-by: Quentin Perret <qperret@google.com> Change-Id: Ic1382bfa24db556161cf1a184a4d44724d7849a1
This commit is contained in:
@@ -2663,9 +2663,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));
|
||||
fatal("\"%s\" [%s] is a static %s\n",
|
||||
s->name, s->module->name,
|
||||
export_str(s->export));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user