Lines Matching full:linux
12 # Check for missing #include <linux/export.h>
14 # The rule for including <linux/export.h> is very simple:
15 # Include <linux/export.h> only when you use EXPORT_SYMBOL(). That's it.
17 # However, some headers include <linux/export.h> even though they are completely
20 # One example is include/linux/module.h. Please note <linux/module.h> and
21 # <linux/export.h> are orthogonal. <linux/module.h> should be included by files
22 # that can be compiled as modules. In other words, <linux/module.h> should be
23 # included by EXPORT_SYMBOL consumers. In contrast, <linux/export.h> should be
25 # Hence, include/linux/module.h should *not* include <linux/export.h>.
27 # Another example is include/linux/linkage.h, which is completely unrelated to
29 # files end up including <linux/export.h>, even though only some of them
30 # actually export symbols. Hence, include/linux/linkage.h should *not* include
31 # <linux/export.h>.
34 # include <linux/export.h> directly, since many C files currently rely on
35 # <linux/export.h> being included indirectly (likely, via <linux/linkage> etc.).
40 # include <linux/export.h>. Please add #include <linux/export.h> to them.
43 # <linux/export.h> in the appropriate position to maintain the sort order.
44 # For this reason, this script only checks missing <linux/export.h>, but
49 -- '*.[ch]' :^tools/ :^include/linux/export.h |
50 …xargs -r git -C "${srctree:-.}" grep --files-without-match '#include[[:space:]]*<linux/export\.h>'…
51 …xargs -r printf "%s: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing\n"…
54 # If you do not use EXPORT_SYMBOL(), please do not include <linux/export.h>.
56 # *.c files rely on <linux/export.h> being included indirectly.
59 git -C "${srctree:-.}" grep --files-with-matches '#include[[:space:]]*<linux/export\.h>' \
62 …xargs -r printf "%s: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is presen…