summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-10-26 14:23:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 16:52:21 -0700
commit93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5 (patch)
tree7b0c7f31bbf7ca0f083c1372e2cf6ebc3eaac20a /scripts
parentcb710eca6820493add0ddd3d7e8e3ee53f2b6e57 (diff)
downloadblackbird-op-linux-93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5.tar.gz
blackbird-op-linux-93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5.zip
scripts/checkpatch.pl: add check for declaration of pci_device_id
Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2ec5fc6a4046..90b54d4697fd 100755
--- 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/ &&
OpenPOWER on IntegriCloud