1. 15 Feb, 2016 2 commits
  2. 13 Jan, 2016 1 commit
  3. 11 Jan, 2016 1 commit
  4. 12 Oct, 2015 2 commits
  5. 25 Sep, 2015 1 commit
  6. 16 Sep, 2015 1 commit
  7. 09 Sep, 2015 2 commits
  8. 28 Apr, 2015 1 commit
  9. 13 Jan, 2015 1 commit
    • Max Reitz's avatar
      checkpatch: Brace handling on multi-line condition · a97ceca5
      Max Reitz authored
      CODING_STYLE states the following about braces around blocks:
      
      > The opening brace is on the line that contains the control flow
      > statement that introduces the new block; [...]
      
      This is obviously impossible with multi-line conditions. Therefore,
      CODING_STYLE does not make any clear statement about where to put the
      opening brace after a multi-line condition.
      
      There is a reason to prefer to place the opening brace on an own line
      after such a condition while still placing it on the same line as the
      "control flow statement" if possible; that reason is that the last line
      of a multi-line condition is indented, in the case of "if", it is often
      indented by four spaces, just as much as the first statement in the
      block will be indented. This is hard to read as there is no clearly
      visible distinction between condition and block. Placing the opening
      brace on a separate line solves this issue.
      
      Also, there are cases where placing the opening brace on a separate line
      is the only viable option; if the previous line had nearly 80 characters
      and splitting it is not desirable, the opening brace is naturally placed
      on an own line.
      
      This patch fixes checkpatch.pl to not complain about braces on own lines
      if the condition introducing the block spanned more than one line, or if
      the previous line had 79 or 80 characters.
      
      Furthermore, the warning about not having braces around a block is fixed
      to mind braces not being on the last line of the condition.
      Signed-off-by: 's avatarMax Reitz <mreitz@redhat.com>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      a97ceca5
  10. 26 Aug, 2014 1 commit
  11. 09 Sep, 2013 1 commit
  12. 05 Sep, 2012 4 commits
  13. 22 Jun, 2012 1 commit
  14. 14 Dec, 2011 1 commit
  15. 02 Dec, 2011 1 commit
  16. 26 Nov, 2011 1 commit
  17. 01 Nov, 2011 1 commit
  18. 27 Aug, 2011 1 commit
  19. 20 Jul, 2011 1 commit
  20. 16 Jul, 2011 1 commit
    • Alexander Graf's avatar
      checkpatch: don't error out on },{ lines · 9fbe4784
      Alexander Graf authored
      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: 's avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: 's avatarAlexander Graf <agraf@suse.de>
      9fbe4784
  21. 05 Feb, 2011 1 commit
  22. 21 Jan, 2011 1 commit
  23. 20 Jan, 2011 2 commits