summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20checkpatch: Fix bracing false positives on #ifBlue Swirl1-0/+1
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else, fix also #if. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-17checkpatch: don't error out on },{ linesAlexander Graf1-1/+3
When having code like this: static PCIDeviceInfo piix_ide_info[] = { { .qdev.name = "piix3-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1, .init = pci_piix_ide_initfn, .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, .class_id = PCI_CLASS_STORAGE_IDE, },{ .qdev.name = "piix4-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1, .init = pci_piix_ide_initfn, .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82371AB, .class_id = PCI_CLASS_STORAGE_IDE, },{ /* end of list */ } }; checkpatch currently errors out, claiming that spaces need to follow commas. However, this particular style of defining structs is pretty common in qemu code and very readable. So let's declare it as supported for the above case. Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-02-05checkpatch.pl: don't complain about old lines with tabsBlue Swirl1-1/+1
Don't complain when the patch includes lines with tabs only in the hunk's untouched context. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-21checkpatch: Fix bracing false positives on #elseJan Kiszka1-1/+2
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-20checkpatch: adjust to QEMUismsBlue Swirl1-46/+18
Change checkpatch.pl for QEMU use: - Root directory detection - Forbid tabs - Indent at 4 spaces - Allow typedefs - Enforce brace use even for single statement blocks - Don't suggest nonexistent cleanup tools Mention the script in CODING_STYLE. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-20Add checkpatch.pl from Linux kernelBlue Swirl1-0/+2937
Unchanged import from http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-0.31 Signed-off-by: Blue Swirl <blauwirbel@gmail.com>