You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/misc-check: check missing #include <linux/export.h> when W=1
The problem was described in commit 5b20755 ("init: move THIS_MODULE
from <linux/export.h> to <linux/init.h>").
To summarize it again here: <linux/export.h> is included by most C files,
even though only some of them actually export symbols. This is because
some headers, such as include/linux/{module.h,linkage}, needlessly
include <linux/export.h>.
I have added a more detailed explanation in the comments of
scripts/misc-check.
This problem will be fixed in two steps:
1. Add #include <linux/export.h> directly to C files that use
EXPORT_SYMBOL()
2. Remove #include <linux/export.h> from header files that do not use
EXPORT_SYMBOL()
This commit addresses step 1; scripts/misc-check will warn about *.[ch]
files that use EXPORT_SYMBOL() but do not include <linux/export.h>.
This check is only triggered when the kernel is built with W=1.
We need to fix 4000+ files. I hope others will help with this effort.
Signed-off-by: Masahiro Yamada <[email protected]>
0 commit comments