[PATCH] PCI: Fix coding style in pci_sort_bf_cmp()

Jiwon Kang <[email protected]>
Newsgroups org.kernel.vger.linux-pci,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Split single-line if/else statements with trailing
return into separate lines

Signed-off-by: Jiwon Kang <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.