From 837ce755de6101f73e2a2fffaa52eea880175efd Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 26 Oct 2010 14:23:21 -0700 Subject: [PATCH] --- yaml --- r: 217598 b: refs/heads/master c: 93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2afb89f3a348..f2e625b1b502 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb710eca6820493add0ddd3d7e8e3ee53f2b6e57 +refs/heads/master: 93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 2ec5fc6a4046..90b54d4697fd 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/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/ &&