提交 88a97da1 编写于 作者: J Jon Derrick 提交者: Bjorn Helgaas

PCI: Remove return values from pcie_port_platform_notify() and relatives

Now that pcie_port_acpi_setup() always returns 0, make it and its callers
void functions and stop checking the return values.

[bhelgaas: changelog]
Signed-off-by: NJon Derrick <jonathan.derrick@intel.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 52966bd1
...@@ -67,17 +67,14 @@ static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {} ...@@ -67,17 +67,14 @@ static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {}
#endif /* !CONFIG_PCIE_PME */ #endif /* !CONFIG_PCIE_PME */
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
int pcie_port_acpi_setup(struct pci_dev *port, int *mask); void pcie_port_acpi_setup(struct pci_dev *port, int *mask);
static inline int pcie_port_platform_notify(struct pci_dev *port, int *mask) static inline void pcie_port_platform_notify(struct pci_dev *port, int *mask)
{ {
return pcie_port_acpi_setup(port, mask); pcie_port_acpi_setup(port, mask);
} }
#else /* !CONFIG_ACPI */ #else /* !CONFIG_ACPI */
static inline int pcie_port_platform_notify(struct pci_dev *port, int *mask) static inline void pcie_port_platform_notify(struct pci_dev *port, int *mask){}
{
return 0;
}
#endif /* !CONFIG_ACPI */ #endif /* !CONFIG_ACPI */
#endif /* _PORTDRV_H_ */ #endif /* _PORTDRV_H_ */
...@@ -32,22 +32,22 @@ ...@@ -32,22 +32,22 @@
* NOTE: It turns out that we cannot do that for individual port services * NOTE: It turns out that we cannot do that for individual port services
* separately, because that would make some systems work incorrectly. * separately, because that would make some systems work incorrectly.
*/ */
int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask) void pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask)
{ {
struct acpi_pci_root *root; struct acpi_pci_root *root;
acpi_handle handle; acpi_handle handle;
u32 flags; u32 flags;
if (acpi_pci_disabled) if (acpi_pci_disabled)
return 0; return;
handle = acpi_find_root_bridge_handle(port); handle = acpi_find_root_bridge_handle(port);
if (!handle) if (!handle)
return 0; return;
root = acpi_pci_find_root(handle); root = acpi_pci_find_root(handle);
if (!root) if (!root)
return 0; return;
flags = root->osc_control_set; flags = root->osc_control_set;
...@@ -58,6 +58,4 @@ int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask) ...@@ -58,6 +58,4 @@ int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask)
*srv_mask |= PCIE_PORT_SERVICE_PME; *srv_mask |= PCIE_PORT_SERVICE_PME;
if (flags & OSC_PCI_EXPRESS_AER_CONTROL) if (flags & OSC_PCI_EXPRESS_AER_CONTROL)
*srv_mask |= PCIE_PORT_SERVICE_AER; *srv_mask |= PCIE_PORT_SERVICE_AER;
return 0;
} }
...@@ -256,7 +256,6 @@ static int get_port_device_capability(struct pci_dev *dev) ...@@ -256,7 +256,6 @@ static int get_port_device_capability(struct pci_dev *dev)
int services = 0; int services = 0;
u32 reg32; u32 reg32;
int cap_mask = 0; int cap_mask = 0;
int err;
if (pcie_ports_disabled) if (pcie_ports_disabled)
return 0; return 0;
...@@ -266,11 +265,8 @@ static int get_port_device_capability(struct pci_dev *dev) ...@@ -266,11 +265,8 @@ static int get_port_device_capability(struct pci_dev *dev)
if (pci_aer_available()) if (pci_aer_available())
cap_mask |= PCIE_PORT_SERVICE_AER; cap_mask |= PCIE_PORT_SERVICE_AER;
if (pcie_ports_auto) { if (pcie_ports_auto)
err = pcie_port_platform_notify(dev, &cap_mask); pcie_port_platform_notify(dev, &cap_mask);
if (err)
return 0;
}
/* Hot-Plug Capable */ /* Hot-Plug Capable */
if ((cap_mask & PCIE_PORT_SERVICE_HP) && if ((cap_mask & PCIE_PORT_SERVICE_HP) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册