All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: andr2000@gmail.com, sstabellini@kernel.org,
	Artem_Mygaiev@epam.com, jbeulich@suse.com, Luca.Fancellu@arm.com,
	roger.pau@citrix.com, marmarek@invisiblethingslab.com,
	andrew.cooper3@citrix.com, anthony.perard@vates.tech
Subject: [PATCH 4/4] [EXAMPLE] Whole file code style formatting
Date: Sat,  1 Mar 2025 13:42:42 +0200	[thread overview]
Message-ID: <20250301114242.93650-5-andr2000@gmail.com> (raw)
In-Reply-To: <20250301114242.93650-1-andr2000@gmail.com>

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 --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;
-- 
2.25.1



  parent reply	other threads:[~2025-03-01 11:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-01 11:42 [PATCH 0/4] clang-format with examples Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 1/4] Add .clang-format files to enable manual coding style checks Oleksandr Andrushchenko
2025-03-03 15:05   ` Roger Pau Monné
2025-03-03 19:23     ` Oleksandr Andrushchenko
2025-03-04  8:17       ` Roger Pau Monné
2025-03-04 20:04         ` Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 2/4] [EXAMPLE] Provide an example of a malformed patch Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 3/4] [EXAMPLE] Changes done by clang-format to the previous commit Oleksandr Andrushchenko
2025-03-01 11:42 ` Oleksandr Andrushchenko [this message]
2025-03-04 19:09 ` [PATCH 0/4] clang-format with examples Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250301114242.93650-5-andr2000@gmail.com \
    --to=andr2000@gmail.com \
    --cc=Artem_Mygaiev@epam.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.