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
2#2#
3# headers_check.pl execute a number of trivial consistency checks3# 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 files6# dir: dir to look for included files
7# arch: architecture7# arch: architecture
8# files: list of files to check8# files: list of files to check
@@ -37,7 +37,7 @@ foreach my $file (@files) { · 28 unmodified lines
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,10 +61,12 @@ sub check_include · 17 unmodified lines
61 }61 }
62}62}
63 63
64sub check_prototypes64sub 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