diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 17:12:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 17:12:18 -0400 |
commit | 45e3e1935e2857c54783291107d33323b3ef33c8 (patch) | |
tree | 26a6e3228b52d0f96f6e56e5879ca898fe909592 /scripts/headers_check.pl | |
parent | cf5046323ea254be72535648a9d090b18b8510f3 (diff) | |
parent | 3f8d9ced7746f3f329ccca0bb3f3c7a2c15c47bb (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits)
.gitignore: ignore *.lzma files
kbuild: add generic --set-str option to scripts/config
kbuild: simplify argument loop in scripts/config
kbuild: handle non-existing options in scripts/config
kallsyms: generalize text region handling
kallsyms: support kernel symbols in Blackfin on-chip memory
documentation: make version fix
kbuild: fix a compile warning
gitignore: Add GNU GLOBAL files to top .gitignore
kbuild: fix delay in setlocalversion on readonly source
README: fix misleading pointer to the defconf directory
vmlinux.lds.h update
kernel-doc: cleanup perl script
Improve vmlinux.lds.h support for arch specific linker scripts
kbuild: fix headers_exports with boolean expression
kbuild/headers_check: refine extern check
kbuild: fix "Argument list too long" error for "make headers_check",
ignore *.patch files
Remove bashisms from scripts
menu: fix embedded menu presentation
...
Diffstat (limited to 'scripts/headers_check.pl')
-rw-r--r-- | scripts/headers_check.pl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 56f90a480899..db1dd7a549f2 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl | |||
@@ -2,7 +2,7 @@ | |||
2 | # | 2 | # |
3 | # headers_check.pl execute a number of trivial consistency checks | 3 | # headers_check.pl execute a number of trivial consistency checks |
4 | # | 4 | # |
5 | # Usage: headers_check.pl dir [files...] | 5 | # Usage: headers_check.pl dir arch [files...] |
6 | # dir: dir to look for included files | 6 | # dir: dir to look for included files |
7 | # arch: architecture | 7 | # arch: architecture |
8 | # files: list of files to check | 8 | # files: list of files to check |
@@ -37,7 +37,7 @@ foreach my $file (@files) { | |||
37 | &check_include(); | 37 | &check_include(); |
38 | &check_asm_types(); | 38 | &check_asm_types(); |
39 | &check_sizetypes(); | 39 | &check_sizetypes(); |
40 | &check_prototypes(); | 40 | &check_declarations(); |
41 | # Dropped for now. Too much noise &check_config(); | 41 | # Dropped for now. Too much noise &check_config(); |
42 | } | 42 | } |
43 | close FH; | 43 | close FH; |
@@ -61,16 +61,18 @@ sub check_include | |||
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | sub check_prototypes | 64 | sub check_declarations |
65 | { | 65 | { |
66 | if ($line =~ m/^\s*extern\b/) { | 66 | if ($line =~m/^\s*extern\b/) { |
67 | printf STDERR "$filename:$lineno: extern's make no sense in userspace\n"; | 67 | printf STDERR "$filename:$lineno: " . |
68 | "userspace cannot call function or variable " . | ||
69 | "defined in the kernel\n"; | ||
68 | } | 70 | } |
69 | } | 71 | } |
70 | 72 | ||
71 | sub check_config | 73 | sub check_config |
72 | { | 74 | { |
73 | if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9]+)[^a-zA-Z0-9]/) { | 75 | if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9_]+)[^a-zA-Z0-9_]/) { |
74 | printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n"; | 76 | printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n"; |
75 | } | 77 | } |
76 | } | 78 | } |