summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2018-04-20 14:13:38 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2018-04-20 14:13:38 +1000
commit5831b025c107c52ffe1b89e7e4f20fe00c20bac3 (patch)
tree5b489e6a10a206713c889ba115373cb929472af4 /scripts
parentf90f921ad8cb914dff4950b1c20014d8af47f830 (diff)
parentfdb1a3b69d1b9ef528b8a728682499e3dcd7719d (diff)
downloadlinux-next-5831b025c107c52ffe1b89e7e4f20fe00c20bac3.tar.gz
Merge branch 'akpm-current/current'
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e16d6713f236..24618dffc5cb 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6257,6 +6257,13 @@ sub process {
"Avoid using bool as bitfield. Prefer bool bitfields as unsigned int or u<8|16|32>\n" . $herecurr);
}
+# check for bool use in .h files
+ if ($realfile =~ /\.h$/ &&
+ $sline =~ /^.\s+bool\s*$Ident\s*(?::\s*d+\s*)?;/) {
+ CHK("BOOL_MEMBER",
+ "Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384\n" . $herecurr);
+ }
+
# check for semaphores initialized locked
if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
WARN("CONSIDER_COMPLETION",