aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-08-28 14:43:25 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 20:43:53 -0400
commitb19441af185559118e8247382ea4f2f76ebffc6d (patch)
tree5b687d2a0052b38fa5d32abeec75374b4aa8830e /drivers/pci/pcie
parent660a0e8fdf85f30b1e5f6905a78361476094eb7c (diff)
PCI: fix __must_check warnings
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c3
-rw-r--r--drivers/pci/pcie/portdrv_core.c6
-rw-r--r--drivers/pci/pcie/portdrv_pci.c16
3 files changed, 16 insertions, 9 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 5591043acea7..1c7e660d6535 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -357,7 +357,8 @@ static int find_aer_service_iter(struct device *device, void *data)
357static void find_aer_service(struct pci_dev *dev, 357static void find_aer_service(struct pci_dev *dev,
358 struct find_aer_service_data *data) 358 struct find_aer_service_data *data)
359{ 359{
360 device_for_each_child(&dev->dev, data, find_aer_service_iter); 360 int retval;
361 retval = device_for_each_child(&dev->dev, data, find_aer_service_iter);
361} 362}
362 363
363static pci_ers_result_t reset_link(struct pcie_device *aerdev, 364static pci_ers_result_t reset_link(struct pcie_device *aerdev,
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index cf9e810b4bf8..bd6615b4d40e 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -340,8 +340,7 @@ static int suspend_iter(struct device *dev, void *data)
340 340
341int pcie_port_device_suspend(struct pci_dev *dev, pm_message_t state) 341int pcie_port_device_suspend(struct pci_dev *dev, pm_message_t state)
342{ 342{
343 device_for_each_child(&dev->dev, &state, suspend_iter); 343 return device_for_each_child(&dev->dev, &state, suspend_iter);
344 return 0;
345} 344}
346 345
347static int resume_iter(struct device *dev, void *data) 346static int resume_iter(struct device *dev, void *data)
@@ -359,8 +358,7 @@ static int resume_iter(struct device *dev, void *data)
359 358
360int pcie_port_device_resume(struct pci_dev *dev) 359int pcie_port_device_resume(struct pci_dev *dev)
361{ 360{
362 device_for_each_child(&dev->dev, NULL, resume_iter); 361 return device_for_each_child(&dev->dev, NULL, resume_iter);
363 return 0;
364} 362}
365#endif 363#endif
366 364
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index e4a2429986f0..037690e08f5f 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -147,8 +147,10 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev,
147{ 147{
148 struct aer_broadcast_data result_data = 148 struct aer_broadcast_data result_data =
149 {error, PCI_ERS_RESULT_CAN_RECOVER}; 149 {error, PCI_ERS_RESULT_CAN_RECOVER};
150 int retval;
150 151
151 device_for_each_child(&dev->dev, &result_data, error_detected_iter); 152 /* can not fail */
153 retval = device_for_each_child(&dev->dev, &result_data, error_detected_iter);
152 154
153 return result_data.result; 155 return result_data.result;
154} 156}
@@ -181,8 +183,10 @@ static int mmio_enabled_iter(struct device *device, void *data)
181static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) 183static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev)
182{ 184{
183 pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; 185 pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
186 int retval;
184 187
185 device_for_each_child(&dev->dev, &status, mmio_enabled_iter); 188 /* get true return value from &status */
189 retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter);
186 return status; 190 return status;
187} 191}
188 192
@@ -214,6 +218,7 @@ static int slot_reset_iter(struct device *device, void *data)
214static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) 218static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
215{ 219{
216 pci_ers_result_t status; 220 pci_ers_result_t status;
221 int retval;
217 222
218 /* If fatal, restore cfg space for possible link reset at upstream */ 223 /* If fatal, restore cfg space for possible link reset at upstream */
219 if (dev->error_state == pci_channel_io_frozen) { 224 if (dev->error_state == pci_channel_io_frozen) {
@@ -221,7 +226,8 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
221 pci_enable_pcie_error_reporting(dev); 226 pci_enable_pcie_error_reporting(dev);
222 } 227 }
223 228
224 device_for_each_child(&dev->dev, &status, slot_reset_iter); 229 /* get true return value from &status */
230 retval = device_for_each_child(&dev->dev, &status, slot_reset_iter);
225 231
226 return status; 232 return status;
227} 233}
@@ -248,7 +254,9 @@ static int resume_iter(struct device *device, void *data)
248 254
249static void pcie_portdrv_err_resume(struct pci_dev *dev) 255static void pcie_portdrv_err_resume(struct pci_dev *dev)
250{ 256{
251 device_for_each_child(&dev->dev, NULL, resume_iter); 257 int retval;
258 /* nothing to do with error value, if it ever happens */
259 retval = device_for_each_child(&dev->dev, NULL, resume_iter);
252} 260}
253 261
254/* 262/*