diff options
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 | } |