From: Jiwon Kang <kkjiwon04@gmail.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiwon Kang <kkjiwon04@gmail.com>
Subject: [PATCH] PCI: Fix coding style in pci_sort_bf_cmp()
Date: Thu, 30 Jul 2026 10:38:20 +0900 [thread overview]
Message-ID: <20260730013820.20147-1-kkjiwon04@gmail.com> (raw)
Split single-line if/else statements with trailing
return into separate lines
Signed-off-by: Jiwon Kang <kkjiwon04@gmail.com>
---
drivers/pci/probe.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index dd0abbc63e18d..f5972c2c50340 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -3527,14 +3527,20 @@ static int __init pci_sort_bf_cmp(const struct device *d_a,
const struct pci_dev *a = to_pci_dev(d_a);
const struct pci_dev *b = to_pci_dev(d_b);
- if (pci_domain_nr(a->bus) < pci_domain_nr(b->bus)) return -1;
- else if (pci_domain_nr(a->bus) > pci_domain_nr(b->bus)) return 1;
+ if (pci_domain_nr(a->bus) < pci_domain_nr(b->bus))
+ return -1;
+ else if (pci_domain_nr(a->bus) > pci_domain_nr(b->bus))
+ return 1;
- if (a->bus->number < b->bus->number) return -1;
- else if (a->bus->number > b->bus->number) return 1;
+ if (a->bus->number < b->bus->number)
+ return -1;
+ else if (a->bus->number > b->bus->number)
+ return 1;
- if (a->devfn < b->devfn) return -1;
- else if (a->devfn > b->devfn) return 1;
+ if (a->devfn < b->devfn)
+ return -1;
+ else if (a->devfn > b->devfn)
+ return 1;
return 0;
}
--
2.34.1
next reply other threads:[~2026-07-30 1:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 1:38 Jiwon Kang [this message]
2026-07-30 1:41 ` [PATCH] PCI: Fix coding style in pci_sort_bf_cmp() sashiko-bot
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=20260730013820.20147-1-kkjiwon04@gmail.com \
--to=kkjiwon04@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox