mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-19 08:05:27 +08:00
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>
This commit is contained in:
parent
cb710eca68
commit
93ed0e2d07
@ -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/ &&
|
||||
|
Loading…
Reference in New Issue
Block a user