Commit 67b7ebe091cd92fd69f732da3170720d79c4e632

Authored by Amerigo Wang
Committed by Sam Ravnborg
1 parent 7211b8b902

kbuild/headers_check: refine extern check

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

Signed-off-by: WANG Cong <amwang@redhat.com>
[sam: redid the extern error message]
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Showing 1 changed file with 7 additions and 5 deletions Side-by-side Diff

scripts/headers_check.pl
... ... @@ -2,7 +2,7 @@
2 2 #
3 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 6 # dir: dir to look for included files
7 7 # arch: architecture
8 8 # files: list of files to check
... ... @@ -37,7 +37,7 @@
37 37 &check_include();
38 38 &check_asm_types();
39 39 &check_sizetypes();
40   - &check_prototypes();
  40 + &check_declarations();
41 41 # Dropped for now. Too much noise &check_config();
42 42 }
43 43 close FH;
44 44  
... ... @@ -61,10 +61,12 @@
61 61 }
62 62 }
63 63  
64   -sub check_prototypes
  64 +sub check_declarations
65 65 {
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";
68 70 }
69 71 }
70 72