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:
cb710ec
)
scripts/checkpatch.pl: add check for declaration of pci_device_id
author
Joe Perches
<
[email protected]
>
Tue, 26 Oct 2010 21:23:21 +0000
(14:23 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Oct 2010 23:52:21 +0000
(16:52 -0700)
Signed-off-by: Joe Perches <
[email protected]
>
Cc: Andy Whitcroft <
[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 2ec5fc6a40462930bcb37cc1fdfb59154f2373b1..90b54d4697fd2de9ae1dcecc80fc25cdcab63d21 100755
(executable)
--- a/
scripts/checkpatch.pl
+++ b/
scripts/checkpatch.pl
@@
-1881,6
+1881,11
@@
sub process {
$herecurr);
}
+# check for declarations of struct pci_device_id
+ if ($line =~ /\bstruct\s+pci_device_id\s+\w+\s*\[\s*\]\s*\=\s*\{/) {
+ WARN("Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id\n" . $herecurr);
+ }
+
# check for new typedefs, only function parameters and sparse annotations
# make sense.
if ($line =~ /\btypedef\s/ &&