summaryrefslogtreecommitdiff
path: root/usr/include/headers_check.pl
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2025-11-21 11:21:20 +0100
committerPeter Zijlstra <peterz@infradead.org>2025-11-21 11:21:20 +0100
commit2ace52718376fdb56aca863da2eebe70d7e2ddb1 (patch)
tree494517cf79608fa93840a3c84ee5e6118da5f26f /usr/include/headers_check.pl
parenta53d0cf7f1cb3182ad533ff5cacfa5fd29c419ad (diff)
parent11991999a20145b7f8af21202d0cac6b1f90a6e4 (diff)
Merge branch 'objtool/core'
Bring in the UDB and objtool data annotations to avoid conflicts while further extending the bug exceptions. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'usr/include/headers_check.pl')
-rwxr-xr-xusr/include/headers_check.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
index 2b70bfa5558e..1fbc8785f96e 100755
--- a/usr/include/headers_check.pl
+++ b/usr/include/headers_check.pl
@@ -74,6 +74,7 @@ sub check_declarations
printf STDERR "$filename:$lineno: " .
"userspace cannot reference function or " .
"variable defined in the kernel\n";
+ $ret = 1;
}
}
@@ -98,9 +99,8 @@ sub check_asm_types
if ($line =~ m/^\s*#\s*include\s+<asm\/types.h>/) {
$linux_asm_types = 1;
printf STDERR "$filename:$lineno: " .
- "include of <linux/types.h> is preferred over <asm/types.h>\n"
- # Warn until headers are all fixed
- #$ret = 1;
+ "include of <linux/types.h> is preferred over <asm/types.h>\n";
+ $ret = 1;
}
}
@@ -155,12 +155,13 @@ sub check_sizetypes
if (my $included = ($line =~ /^\s*#\s*include\s+[<"](\S+)[>"]/)[0]) {
check_include_typesh($included);
}
+ # strip single-line comments, as types may be referenced within them
+ $line =~ s@/\*.*?\*/@@;
if ($line =~ m/__[us](8|16|32|64)\b/) {
printf STDERR "$filename:$lineno: " .
"found __[us]{8,16,32,64} type " .
"without #include <linux/types.h>\n";
$linux_types = 2;
- # Warn until headers are all fixed
- #$ret = 1;
+ $ret = 1;
}
}