projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0979ae6
)
checkpatch: warn when declaring "struct spinlock foo;"
author
Joe Perches
<
[email protected]
>
Tue, 18 Dec 2012 00:02:00 +0000
(16:02 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 18 Dec 2012 01:15:19 +0000
(17:15 -0800)
spinlock_t should always be used.
Signed-off-by: Joe Perches <
[email protected]
>
Acked-by: "Luis R. Rodriguez" <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
scripts/checkpatch.pl
patch
|
blob
|
history
diff --git
a/scripts/checkpatch.pl
b/scripts/checkpatch.pl
index e0a674f471eed86504b865a88961f85db11f2d66..f27b0b53e3eadba97e10a4cf6aa7b52c1c4e89c2 100755
(executable)
--- a/
scripts/checkpatch.pl
+++ b/
scripts/checkpatch.pl
@@
-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 &&