Skip to content

Commit

Permalink
kbuild/headers_check: refine extern check
Browse files Browse the repository at this point in the history
'extern' checking information is not clear, refine it.
Plus, fix a comment.

Signed-off-by: WANG Cong <[email protected]>
[sam: redid the extern error message]
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
Amerigo Wang authored and sravnborg committed Jun 9, 2009
1 parent 7211b8b commit 67b7ebe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/headers_check.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# headers_check.pl execute a number of trivial consistency checks
#
# Usage: headers_check.pl dir [files...]
# Usage: headers_check.pl dir arch [files...]
# dir: dir to look for included files
# arch: architecture
# files: list of files to check
Expand Down Expand Up @@ -37,7 +37,7 @@
&check_include();
&check_asm_types();
&check_sizetypes();
&check_prototypes();
&check_declarations();
# Dropped for now. Too much noise &check_config();
}
close FH;
Expand All @@ -61,10 +61,12 @@ sub check_include
}
}

sub check_prototypes
sub check_declarations
{
if ($line =~ m/^\s*extern\b/) {
printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
if ($line =~m/^\s*extern\b/) {
printf STDERR "$filename:$lineno: " .
"userspace cannot call function or variable " .
"defined in the kernel\n";
}
}

Expand Down

0 comments on commit 67b7ebe

Please sign in to comment.