diff mbox series

[4/4,EXAMPLE] Whole file code style formatting

Message ID 20250301114242.93650-5-andr2000@gmail.com (mailing list archive)
State New
Headers show
Series clang-format with examples | expand

Commit Message

Oleksandr Andrushchenko March 1, 2025, 11:42 a.m. UTC
This patch was produced by running clang-format on a file:
clang-format -i xen/drivers/pci/pci.c

Signed-off-by: Oleksandr Andrushchenko <andr2000@gmail.com>
---
 xen/drivers/pci/pci.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/xen/drivers/pci/pci.c b/xen/drivers/pci/pci.c
index edf5b9f7ae9f..f6d8222c1dd4 100644
--- a/xen/drivers/pci/pci.c
+++ b/xen/drivers/pci/pci.c
@@ -56,10 +56,8 @@  unsigned int pci_find_next_cap_ttl(pci_sbdf_t sbdf, unsigned int pos,
         if ( id == 0xff )
             break;
         for ( i = 0; i < n; i++ )
-        {
             if ( id == caps[i] )
                 return pos;
-        }
 
         pos = (pos & ~3) + PCI_CAP_LIST_NEXT;
     }
@@ -116,7 +114,8 @@  unsigned int pci_find_next_ext_capability(pci_sbdf_t sbdf, unsigned int start,
         return 0;
     ASSERT(start != pos || PCI_EXT_CAP_ID(header) == cap);
 
-    while ( ttl-- > 0 ) {
+    while ( ttl-- > 0 )
+    {
         if ( PCI_EXT_CAP_ID(header) == cap && pos != start )
             return pos;
         pos = PCI_EXT_CAP_NEXT(header);
@@ -174,8 +173,7 @@  const char *__init parse_pci_seg(const char *s, unsigned int *seg_p,
     }
     else
         func = 0;
-    if ( seg != (seg_p ? (u16)seg : 0) ||
-         bus != PCI_BUS(PCI_BDF(bus, 0)) ||
+    if ( seg != (seg_p ? (u16)seg : 0) || bus != PCI_BUS(PCI_BDF(bus, 0)) ||
          dev != PCI_SLOT(PCI_DEVFN(dev, 0)) ||
          func != PCI_FUNC(PCI_DEVFN(0, func)) )
         return NULL;