Skip to contentSkip to conversation

PCI: vmd: Clean up some inconsistent indenting

PATCH Superseded Jiapeng Chong 4 participants 4 messages Nov 15, 2022 – Nov 16, 2022

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: vmd: Clean up some inconsistent indenting

No functional modification involved.

drivers/pci/controller/vmd.c:983 vmd_resume() warn: inconsistent indenting.

---
 drivers/pci/controller/vmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pci/controller/vmd.c +4 -4
index 98e0746e681c..b7914637048a 100644
@@ -980,10 +980,10 @@ static int vmd_resume(struct device *dev)
 	struct vmd_dev *vmd = pci_get_drvdata(pdev);
 	int err, i;
 
-       if (vmd->irq_domain)
-               vmd_set_msi_remapping(vmd, true);
-       else
-               vmd_set_msi_remapping(vmd, false);
+	if (vmd->irq_domain)
+		vmd_set_msi_remapping(vmd, true);
+	else
+		vmd_set_msi_remapping(vmd, false);
 
 	for (i = 0; i < vmd->msix_count; i++) {
 		err = devm_request_irq(dev, vmd->irqs[i].virq,
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

drivers/pci/controller/vmd.c static int vmd_resume(struct device *dev) · line 986

Quoted 4 lines · Jiapeng Chong
drivers/pci/controller/vmd.c +4 -0
+	if (vmd->irq_domain)
+		vmd_set_msi_remapping(vmd, true);
+	else
+		vmd_set_msi_remapping(vmd, false);

Why not go one step further:

	vmd_set_msi_remapping(vmd, !!vmd->irq_domain);

?

#2 lore raw

Hello,

Quoted 8 lines

drivers/pci/controller/vmd.c static int vmd_resume(struct device *dev) · line 986

Quoted 4 lines
drivers/pci/controller/vmd.c +4 -0
+	if (vmd->irq_domain)
+		vmd_set_msi_remapping(vmd, true);
+	else
+		vmd_set_msi_remapping(vmd, false);

Why not go one step further:

	vmd_set_msi_remapping(vmd, !!vmd->irq_domain);

Jiapeng, if you want to get this patch merged, and it's a nice clean-up, then apply suggestion from Christoph and send a v2, if possible.

Krzysztof

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Jiapeng Chong
Quoted 20 lines · Jiapeng Chong

No functional modification involved.

drivers/pci/controller/vmd.c:983 vmd_resume() warn: inconsistent indenting.

---
 drivers/pci/controller/vmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pci/controller/vmd.c +0 -1
index 98e0746e681c..b7914637048a 100644
@@ -980,10 +980,10 @@ static int vmd_resume(struct device *dev)
 	struct vmd_dev *vmd = pci_get_drvdata(pdev);
 	int err, i;
 
-       if (vmd->irq_domain)

drivers/pci/controller/vmd.c static int vmd_resume(struct device *dev) · line 989

Quoted 10 lines
drivers/pci/controller/vmd.c +4 -3
-               vmd_set_msi_remapping(vmd, true);
-       else
-               vmd_set_msi_remapping(vmd, false);
+	if (vmd->irq_domain)
+		vmd_set_msi_remapping(vmd, true);
+	else
+		vmd_set_msi_remapping(vmd, false);
 
 	for (i = 0; i < vmd->msix_count; i++) {
 		err = devm_request_irq(dev, vmd->irqs[i].virq,

Thanks