aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/headers_check.pl
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-06-18 18:20:55 -0400
committerJames Morris <jmorris@namei.org>2009-06-18 18:20:55 -0400
commitd905163c5b23f6d8511971e06081a1b525e8a0bd (patch)
treef76918c1be802ec068d37763466f5518efdb690e /scripts/headers_check.pl
parent44c2d9bdd7022ca7d240d5adc009296fc1c6ce08 (diff)
parent0732f87761dbe417cb6e084b712d07e879e876ef (diff)
Merge branch 'master' into next
Diffstat (limited to 'scripts/headers_check.pl')
-rw-r--r--scripts/headers_check.pl14
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
64sub check_prototypes 64sub 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
71sub check_config 73sub 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}