diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-12 13:18:01 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-15 12:56:27 -0400 |
commit | b638d7e7b849ad402aaecfe7edb599687b5eb3a8 (patch) | |
tree | ed295c912fa9448fe0b32cdbe062c4d36eb3f61a /drivers/pci | |
parent | c3139ba212ddc240656f4bcfc7c946418cd83e19 (diff) |
PCI: Remove unused variables
This fixes "set but not used" warnings found via "make W=1".
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 17 | ||||
-rw-r--r-- | drivers/pci/setup-res.c | 2 |
3 files changed, 5 insertions, 16 deletions
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 6a25f4d8ba32..9d4c199a64be 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -520,10 +520,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) | |||
520 | int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug, | 520 | int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug, |
521 | struct hotplug_slot_info *info) | 521 | struct hotplug_slot_info *info) |
522 | { | 522 | { |
523 | struct pci_slot *slot; | ||
524 | if (!hotplug || !info) | 523 | if (!hotplug || !info) |
525 | return -ENODEV; | 524 | return -ENODEV; |
526 | slot = hotplug->pci_slot; | ||
527 | 525 | ||
528 | memcpy(hotplug->info, info, sizeof(struct hotplug_slot_info)); | 526 | memcpy(hotplug->info, info, sizeof(struct hotplug_slot_info)); |
529 | 527 | ||
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 08c243ab034e..0efba0539cc9 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -272,11 +272,9 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, | |||
272 | enum pci_channel_state error) | 272 | enum pci_channel_state error) |
273 | { | 273 | { |
274 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; | 274 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; |
275 | int ret; | ||
276 | |||
277 | /* can not fail */ | ||
278 | ret = device_for_each_child(&dev->dev, &data, error_detected_iter); | ||
279 | 275 | ||
276 | /* get true return value from &data */ | ||
277 | device_for_each_child(&dev->dev, &data, error_detected_iter); | ||
280 | return data.result; | 278 | return data.result; |
281 | } | 279 | } |
282 | 280 | ||
@@ -308,10 +306,9 @@ static int mmio_enabled_iter(struct device *device, void *data) | |||
308 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) | 306 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) |
309 | { | 307 | { |
310 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; | 308 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
311 | int retval; | ||
312 | 309 | ||
313 | /* get true return value from &status */ | 310 | /* get true return value from &status */ |
314 | retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter); | 311 | device_for_each_child(&dev->dev, &status, mmio_enabled_iter); |
315 | return status; | 312 | return status; |
316 | } | 313 | } |
317 | 314 | ||
@@ -343,7 +340,6 @@ static int slot_reset_iter(struct device *device, void *data) | |||
343 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | 340 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) |
344 | { | 341 | { |
345 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; | 342 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
346 | int retval; | ||
347 | 343 | ||
348 | /* If fatal, restore cfg space for possible link reset at upstream */ | 344 | /* If fatal, restore cfg space for possible link reset at upstream */ |
349 | if (dev->error_state == pci_channel_io_frozen) { | 345 | if (dev->error_state == pci_channel_io_frozen) { |
@@ -354,8 +350,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | |||
354 | } | 350 | } |
355 | 351 | ||
356 | /* get true return value from &status */ | 352 | /* get true return value from &status */ |
357 | retval = device_for_each_child(&dev->dev, &status, slot_reset_iter); | 353 | device_for_each_child(&dev->dev, &status, slot_reset_iter); |
358 | |||
359 | return status; | 354 | return status; |
360 | } | 355 | } |
361 | 356 | ||
@@ -381,9 +376,7 @@ static int resume_iter(struct device *device, void *data) | |||
381 | 376 | ||
382 | static void pcie_portdrv_err_resume(struct pci_dev *dev) | 377 | static void pcie_portdrv_err_resume(struct pci_dev *dev) |
383 | { | 378 | { |
384 | int retval; | 379 | device_for_each_child(&dev->dev, NULL, resume_iter); |
385 | /* nothing to do with error value, if it ever happens */ | ||
386 | retval = device_for_each_child(&dev->dev, NULL, resume_iter); | ||
387 | } | 380 | } |
388 | 381 | ||
389 | /* | 382 | /* |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 81b88bda7930..07f2eddc09ce 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -261,7 +261,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
261 | { | 261 | { |
262 | struct resource *res = dev->resource + resno; | 262 | struct resource *res = dev->resource + resno; |
263 | resource_size_t align, size; | 263 | resource_size_t align, size; |
264 | struct pci_bus *bus; | ||
265 | int ret; | 264 | int ret; |
266 | 265 | ||
267 | align = pci_resource_alignment(dev, res); | 266 | align = pci_resource_alignment(dev, res); |
@@ -271,7 +270,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
271 | return -EINVAL; | 270 | return -EINVAL; |
272 | } | 271 | } |
273 | 272 | ||
274 | bus = dev->bus; | ||
275 | size = resource_size(res); | 273 | size = resource_size(res); |
276 | ret = _pci_assign_resource(dev, resno, size, align); | 274 | ret = _pci_assign_resource(dev, resno, size, align); |
277 | 275 | ||