diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 447857ffaf6b..5cb7cfd08ce2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -6251,6 +6251,13 @@ sub process { | |||
| 6251 | "Avoid using bool as bitfield. Prefer bool bitfields as unsigned int or u<8|16|32>\n" . $herecurr); | 6251 | "Avoid using bool as bitfield. Prefer bool bitfields as unsigned int or u<8|16|32>\n" . $herecurr); |
| 6252 | } | 6252 | } |
| 6253 | 6253 | ||
| 6254 | # check for bool use in .h files | ||
| 6255 | if ($realfile =~ /\.h$/ && | ||
| 6256 | $sline =~ /^.\s+bool\s*$Ident\s*(?::\s*d+\s*)?;/) { | ||
| 6257 | CHK("BOOL_MEMBER", | ||
| 6258 | "Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384\n" . $herecurr); | ||
| 6259 | } | ||
| 6260 | |||
| 6254 | # check for semaphores initialized locked | 6261 | # check for semaphores initialized locked |
| 6255 | if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { | 6262 | if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { |
| 6256 | WARN("CONSIDER_COMPLETION", | 6263 | WARN("CONSIDER_COMPLETION", |
