Messages in this thread Patch in this message | | | Subject | [PATCH 2/8] headers_check: add check for kernel integer types | From | Paul Bolle <> | Date | Mon, 01 Apr 2013 19:57:21 +0200 |
| |
The u8, u16, u32, and u64, and the s8, s16, s32, and s64 types shouldn't be exported to userspace. Add a simple check for these.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> --- scripts/headers_check.pl | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 64ac238..317aa3a 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -39,6 +39,7 @@ foreach my $file (@files) { &check_include(); &check_asm_types(); &check_sizetypes(); + &check_kerneltypes(); &check_declarations(); # Dropped for now. Too much noise &check_config(); } @@ -159,3 +160,12 @@ sub check_sizetypes #$ret = 1; } } + +sub check_kerneltypes +{ + if ($line =~ m/^[[:space:]]*([us](8|16|32|64))\b/) { + printf STDERR "$filename:$lineno: " . + "found $1 type exported to userspace; " . + "use __$1 instead\n"; + } +} -- 1.7.11.7
| |