summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2025-06-01 22:31:29 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2025-06-06 05:40:25 +0900
commita934a57a42f64a40705202f84144b1a29b29f910 (patch)
tree70cb07a3cbd80fa40d038282ed616c22081a24f2 /tools/perf/scripts/python
parent3a44052b728e5d96ea425f908e71926364a12f11 (diff)
scripts/misc-check: check missing #include <linux/export.h> when W=1
The problem was described in commit 5b20755b7780 ("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 <masahiroy@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions