diff options
author | Jon Derrick <jonathan.derrick@intel.com> | 2016-04-08 13:35:51 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-04-08 16:21:28 -0400 |
commit | 88a97da1eab7587036d8bc937d6bc874b8210df1 (patch) | |
tree | 8f473d01279a5be325f9561faabe323f9a39af9a /drivers/pci/pcie | |
parent | 52966bd1c2a09fdd3149f00568cc18f45cc09785 (diff) |
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: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/portdrv.h | 11 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_acpi.c | 10 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 8 |
3 files changed, 10 insertions, 19 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index d525548404d6..463b60975194 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h | |||
@@ -67,17 +67,14 @@ static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {} | |||
67 | #endif /* !CONFIG_PCIE_PME */ | 67 | #endif /* !CONFIG_PCIE_PME */ |
68 | 68 | ||
69 | #ifdef CONFIG_ACPI | 69 | #ifdef CONFIG_ACPI |
70 | int pcie_port_acpi_setup(struct pci_dev *port, int *mask); | 70 | void pcie_port_acpi_setup(struct pci_dev *port, int *mask); |
71 | 71 | ||
72 | static inline int pcie_port_platform_notify(struct pci_dev *port, int *mask) | 72 | static inline void pcie_port_platform_notify(struct pci_dev *port, int *mask) |
73 | { | 73 | { |
74 | return pcie_port_acpi_setup(port, mask); | 74 | pcie_port_acpi_setup(port, mask); |
75 | } | 75 | } |
76 | #else /* !CONFIG_ACPI */ | 76 | #else /* !CONFIG_ACPI */ |
77 | static inline int pcie_port_platform_notify(struct pci_dev *port, int *mask) | 77 | static inline void pcie_port_platform_notify(struct pci_dev *port, int *mask){} |
78 | { | ||
79 | return 0; | ||
80 | } | ||
81 | #endif /* !CONFIG_ACPI */ | 78 | #endif /* !CONFIG_ACPI */ |
82 | 79 | ||
83 | #endif /* _PORTDRV_H_ */ | 80 | #endif /* _PORTDRV_H_ */ |
diff --git a/drivers/pci/pcie/portdrv_acpi.c b/drivers/pci/pcie/portdrv_acpi.c index f097a73cb291..9f4ed7172fda 100644 --- a/drivers/pci/pcie/portdrv_acpi.c +++ b/drivers/pci/pcie/portdrv_acpi.c | |||
@@ -32,22 +32,22 @@ | |||
32 | * NOTE: It turns out that we cannot do that for individual port services | 32 | * NOTE: It turns out that we cannot do that for individual port services |
33 | * separately, because that would make some systems work incorrectly. | 33 | * separately, because that would make some systems work incorrectly. |
34 | */ | 34 | */ |
35 | int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask) | 35 | void pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask) |
36 | { | 36 | { |
37 | struct acpi_pci_root *root; | 37 | struct acpi_pci_root *root; |
38 | acpi_handle handle; | 38 | acpi_handle handle; |
39 | u32 flags; | 39 | u32 flags; |
40 | 40 | ||
41 | if (acpi_pci_disabled) | 41 | if (acpi_pci_disabled) |
42 | return 0; | 42 | return; |
43 | 43 | ||
44 | handle = acpi_find_root_bridge_handle(port); | 44 | handle = acpi_find_root_bridge_handle(port); |
45 | if (!handle) | 45 | if (!handle) |
46 | return 0; | 46 | return; |
47 | 47 | ||
48 | root = acpi_pci_find_root(handle); | 48 | root = acpi_pci_find_root(handle); |
49 | if (!root) | 49 | if (!root) |
50 | return 0; | 50 | return; |
51 | 51 | ||
52 | flags = root->osc_control_set; | 52 | flags = root->osc_control_set; |
53 | 53 | ||
@@ -58,6 +58,4 @@ int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask) | |||
58 | *srv_mask |= PCIE_PORT_SERVICE_PME; | 58 | *srv_mask |= PCIE_PORT_SERVICE_PME; |
59 | if (flags & OSC_PCI_EXPRESS_AER_CONTROL) | 59 | if (flags & OSC_PCI_EXPRESS_AER_CONTROL) |
60 | *srv_mask |= PCIE_PORT_SERVICE_AER; | 60 | *srv_mask |= PCIE_PORT_SERVICE_AER; |
61 | |||
62 | return 0; | ||
63 | } | 61 | } |
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 88122dc2e1b1..de7a85bc8016 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -256,7 +256,6 @@ static int get_port_device_capability(struct pci_dev *dev) | |||
256 | int services = 0; | 256 | int services = 0; |
257 | u32 reg32; | 257 | u32 reg32; |
258 | int cap_mask = 0; | 258 | int cap_mask = 0; |
259 | int err; | ||
260 | 259 | ||
261 | if (pcie_ports_disabled) | 260 | if (pcie_ports_disabled) |
262 | return 0; | 261 | return 0; |
@@ -266,11 +265,8 @@ static int get_port_device_capability(struct pci_dev *dev) | |||
266 | if (pci_aer_available()) | 265 | if (pci_aer_available()) |
267 | cap_mask |= PCIE_PORT_SERVICE_AER; | 266 | cap_mask |= PCIE_PORT_SERVICE_AER; |
268 | 267 | ||
269 | if (pcie_ports_auto) { | 268 | if (pcie_ports_auto) |
270 | err = pcie_port_platform_notify(dev, &cap_mask); | 269 | pcie_port_platform_notify(dev, &cap_mask); |
271 | if (err) | ||
272 | return 0; | ||
273 | } | ||
274 | 270 | ||
275 | /* Hot-Plug Capable */ | 271 | /* Hot-Plug Capable */ |
276 | if ((cap_mask & PCIE_PORT_SERVICE_HP) && | 272 | if ((cap_mask & PCIE_PORT_SERVICE_HP) && |