History

kbuild/headers_check: refine extern check

'extern' checking information is not clear, refine it. Plus, fix a comment.

Amerigo Wang committed 17 years ago

Commit 67b7ebe1 parent 7211b8b1 file · +7 −5Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/headers_check.pl+7−5
@@ -2,7 +2,7 @@ · 1 unmodified line
22 #
33 # headers_check.pl execute a number of trivial consistency checks
44 #
5−# Usage: headers_check.pl dir [files...]
5+# Usage: headers_check.pl dir arch [files...]
66 # dir: dir to look for included files
77 # arch: architecture
88 # files: list of files to check
@@ -37,7 +37,7 @@ foreach my $file (@files) { · 28 unmodified lines
3737 &check_include();
3838 &check_asm_types();
3939 &check_sizetypes();
40− &check_prototypes();
40+ &check_declarations();
4141 # Dropped for now. Too much noise &check_config();
4242 }
4343 close FH;
@@ -61,10 +61,12 @@ sub check_include · 17 unmodified lines
6161 }
6262 }
6363
64−sub check_prototypes
64+sub check_declarations
6565 {
66− if ($line =~ m/^\s*extern\b/) {
67− printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
66+ if ($line =~m/^\s*extern\b/) {
67+ printf STDERR "$filename:$lineno: " .
68+ "userspace cannot call function or variable " .
69+ "defined in the kernel\n";
6870 }
6971 }
7072