Skip to contentSkip to conversation

PCI: cpqphp: Format if-statement code block correctly

PATCH In review Krzysztof Wilczyński 2 participants 3 messages Oct 13, 2021 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: cpqphp: Format if-statement code block correctly

The if-statement code block as seen in the cpqhp_s

The code block related to the if-statement in cpqhp_set_irq() is somewhat awkwardly formatted making the code hard to read.

Thus, update the code to match preferred code formatting style.

No change to functionality intended.

---
 drivers/pci/hotplug/cpqphp_pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/pci/hotplug/cpqphp_pci.c +4 -2
index 1b2b3f3b648b..9038039ad6db 100644
@@ -189,8 +189,10 @@ int cpqhp_set_irq(u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
 		/* This should only be for x86 as it sets the Edge Level
 		 * Control Register
 		 */
-		outb((u8) (temp_word & 0xFF), 0x4d0); outb((u8) ((temp_word &
-		0xFF00) >> 8), 0x4d1); rc = 0; }
+		outb((u8)(temp_word & 0xFF), 0x4d0);
+		outb((u8)((temp_word & 0xFF00) >> 8), 0x4d1);
+		rc = 0;
+	}
 
 	return rc;
 }
Signature · 1 line
2.33.0
#1 lore raw

Hi Bjorn,

Quoted 1 line

The if-statement code block as seen in the cpqhp_s

This incomplete sentence above should be removed from the commit message.

Looks like I must have accidentally undo previous edit before sending the patch through. Apologies!

Quoted 6 lines

The code block related to the if-statement in cpqhp_set_irq() is somewhat awkwardly formatted making the code hard to read.

Thus, update the code to match preferred code formatting style.

No change to functionality intended.

Krzysztof

#2 lore raw
In reply to Krzysztof Wilczyński
Quoted 5 lines · Krzysztof Wilczyński

The if-statement code block as seen in the cpqhp_s

The code block related to the if-statement in cpqhp_set_irq() is somewhat awkwardly formatted making the code hard to read.

Quoted 8 lines

Thus, update the code to match preferred code formatting style.

No change to functionality intended.

---
 drivers/pci/hotplug/cpqphp_pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Applied with the commit log touchup to pci/misc for v5.16, thanks!

Looks like somebody's "J" key got stuck in vi :)

Quoted 20 lines
drivers/pci/hotplug/cpqphp_pci.c +4 -2
index 1b2b3f3b648b..9038039ad6db 100644
@@ -189,8 +189,10 @@ int cpqhp_set_irq(u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
 		/* This should only be for x86 as it sets the Edge Level
 		 * Control Register
 		 */
-		outb((u8) (temp_word & 0xFF), 0x4d0); outb((u8) ((temp_word &
-		0xFF00) >> 8), 0x4d1); rc = 0; }
+		outb((u8)(temp_word & 0xFF), 0x4d0);
+		outb((u8)((temp_word & 0xFF00) >> 8), 0x4d1);
+		rc = 0;
+	}
 
 	return rc;
 }
Signature · 1 line
2.33.0