[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121207062554.11051.74801.stgit@amt.stowe>
Date: Thu, 06 Dec 2012 23:25:54 -0700
From: Myron Stowe <myron.stowe@...hat.com>
To: bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org, yinghai@...nel.org,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 10/15] PCI/acpiphp: Change acpiphp_add_bridge() to return void
instead of 0
acpiphp_add_bridge() always returns 0. This patch changes the return
type from an 'int' to 'void'.
No functional change.
Signed-off-by: Myron Stowe <myron.stowe@...hat.com>
---
drivers/pci/hotplug/acpiphp_glue.c | 8 +++-----
include/linux/pci-acpi.h | 4 ++--
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index a4218cb..fe2aac6 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -489,7 +489,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
/* find hot-pluggable slots, and then find P2P bridge */
-int acpiphp_add_bridge(struct acpi_pci_root *root)
+void acpiphp_add_bridge(struct acpi_pci_root *root)
{
acpi_status status;
unsigned long long tmp;
@@ -502,11 +502,11 @@ int acpiphp_add_bridge(struct acpi_pci_root *root)
status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
if (ACPI_FAILURE(status)) {
dbg("%s: _STA evaluation failure\n", __func__);
- return 0;
+ return;
}
if ((tmp & ACPI_STA_FUNCTIONING) == 0)
/* don't register this object */
- return 0;
+ return;
}
/* check if this bridge has ejectable slots */
@@ -521,8 +521,6 @@ int acpiphp_add_bridge(struct acpi_pci_root *root)
if (ACPI_FAILURE(status))
warn("find_p2p_bridge failed (error code = 0x%x)\n", status);
-
- return 0;
}
static struct acpiphp_bridge *acpiphp_handle_to_bridge(acpi_handle handle)
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 3197070..bc5b763 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -50,10 +50,10 @@ static inline bool aer_acpi_firmware_first(void) { return false; }
#endif
#ifdef CONFIG_HOTPLUG_PCI_ACPI
-extern int acpiphp_add_bridge(struct acpi_pci_root *root);
+extern void acpiphp_add_bridge(struct acpi_pci_root *root);
extern void acpiphp_remove_bridge(struct acpi_pci_root *root);
#else /* !CONFIG_HOTPLUG_PCI_ACPI */
-static inline int acpiphp_add_bridge(struct acpi_pci_root *) { return 0; }
+static inline void acpiphp_add_bridge(struct acpi_pci_root *) { }
static inline void acpiphp_remove_bridge(struct acpi_pci_root *) { }
#endif /* !CONFIG_HOTPLUG_PCI_ACPI */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists