checkpatch: warn when declaring "struct spinlock foo;"
spinlock_t should always be used. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: "Luis R. Rodriguez" <mcgrof@do-not-panic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0979ae6646
commit
88982fea52
|
@ -3336,6 +3336,12 @@ sub process {
|
|||
"Avoid line continuations in quoted strings\n" . $herecurr);
|
||||
}
|
||||
|
||||
# check for struct spinlock declarations
|
||||
if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
|
||||
WARN("USE_SPINLOCK_T",
|
||||
"struct spinlock should be spinlock_t\n" . $herecurr);
|
||||
}
|
||||
|
||||
# Check for misused memsets
|
||||
if ($^V && $^V ge 5.10.0 &&
|
||||
defined $stat &&
|
||||
|
|
Loading…
Reference in New Issue