summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
Commit message (Collapse)AuthorAgeFilesLines
* checkpatch: Fix bracing false positives on #ifBlue Swirl2011-07-201-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>
* checkpatch: don't error out on },{ linesAlexander Graf2011-07-171-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>
* checkpatch.pl: don't complain about old lines with tabsBlue Swirl2011-02-051-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>
* checkpatch: Fix bracing false positives on #elseJan Kiszka2011-01-211-1/+2
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* checkpatch: adjust to QEMUismsBlue Swirl2011-01-201-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>
* Add checkpatch.pl from Linux kernelBlue Swirl2011-01-201-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>
OpenPOWER on IntegriCloud