Skip to contentSkip to conversation

ACPI/PCI: Remove surplus parentheses from a return statement

PATCH Applied Krzysztof Wilczynski 3 participants 3 messages Aug 19, 2019 – Aug 26, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI/PCI: Remove surplus parentheses from a return statement

Remove unnecessary parentheses enclosing the value in a return statement in the drivers/acpi/pci_link.c.

---
 drivers/acpi/pci_link.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pci_link.c +2 -2
index db11f7771ef1..00a6da2121be 100644
@@ -661,7 +661,7 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 			  "Link %s is referenced\n",
 			  acpi_device_bid(link->device)));
-	return (link->irq.active);
+	return link->irq.active;
 }
 
 /*
@@ -712,7 +712,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
 		acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL);
 
 	mutex_unlock(&acpi_link_lock);
-	return (link->irq.active);
+	return link->irq.active;
 }
 
 /* --------------------------------------------------------------------------
Signature · 1 line
2.22.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Krzysztof Wilczynski

Remove unnecessary parentheses enclosing the value in a return statement in the drivers/acpi/pci_link.c.

---
 drivers/acpi/pci_link.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pci_link.c +1 -1
index db11f7771ef1..00a6da2121be 100644
@@ -661,7 +661,7 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 			  "Link %s is referenced\n",
 			  acpi_device_bid(link->device)));
-	return (link->irq.active);
+	return link->irq.active;
 }
 
 /*

drivers/acpi/pci_link.c int acpi_pci_link_free_irq(acpi_handle handle) · line 715

Quoted 5 lines
drivers/acpi/pci_link.c +1 -1
@@ -712,7 +712,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
 		acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL);
 
 	mutex_unlock(&acpi_link_lock);
-	return (link->irq.active);
+	return link->irq.active;

It looks like these parentheses were left over after a patch that removed some macros:

ad550d98d3317 ("ACPI: delete tracing macros from drivers/acpi/*.c")

I can't see any you've missed so:

Quoted 6 lines
drivers/acpi/pci_link.c +0 -0
 }
 
 /* --------------------------------------------------------------------------
Signature · 1 line
2.22.1
#2 lore raw
In reply to Krzysztof Wilczynski
Quoted 23 lines · CEST Krzysztof Wilczynski

Remove unnecessary parentheses enclosing the value in a return statement in the drivers/acpi/pci_link.c.

---
 drivers/acpi/pci_link.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pci_link.c +1 -1
index db11f7771ef1..00a6da2121be 100644
@@ -661,7 +661,7 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 			  "Link %s is referenced\n",
 			  acpi_device_bid(link->device)));
-	return (link->irq.active);
+	return link->irq.active;
 }
 
 /*

drivers/acpi/pci_link.c int acpi_pci_link_free_irq(acpi_handle handle) · line 718

Quoted 8 lines
drivers/acpi/pci_link.c +1 -1
@@ -712,7 +712,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
 		acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL);
 
 	mutex_unlock(&acpi_link_lock);
-	return (link->irq.active);
+	return link->irq.active;
 }
 
 /* --------------------------------------------------------------------------

Applied, thanks!