PCI: Remove unused variables
This fixes "set but not used" warnings found via "make W=1". Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
c3139ba212
commit
b638d7e7b8
3 changed files with 5 additions and 16 deletions
|
@ -520,10 +520,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
|
||||||
int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug,
|
int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug,
|
||||||
struct hotplug_slot_info *info)
|
struct hotplug_slot_info *info)
|
||||||
{
|
{
|
||||||
struct pci_slot *slot;
|
|
||||||
if (!hotplug || !info)
|
if (!hotplug || !info)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
slot = hotplug->pci_slot;
|
|
||||||
|
|
||||||
memcpy(hotplug->info, info, sizeof(struct hotplug_slot_info));
|
memcpy(hotplug->info, info, sizeof(struct hotplug_slot_info));
|
||||||
|
|
||||||
|
|
|
@ -272,11 +272,9 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev,
|
||||||
enum pci_channel_state error)
|
enum pci_channel_state error)
|
||||||
{
|
{
|
||||||
struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER};
|
struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER};
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* can not fail */
|
|
||||||
ret = device_for_each_child(&dev->dev, &data, error_detected_iter);
|
|
||||||
|
|
||||||
|
/* get true return value from &data */
|
||||||
|
device_for_each_child(&dev->dev, &data, error_detected_iter);
|
||||||
return data.result;
|
return data.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,10 +306,9 @@ static int mmio_enabled_iter(struct device *device, void *data)
|
||||||
static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev)
|
static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
|
pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
|
||||||
int retval;
|
|
||||||
|
|
||||||
/* get true return value from &status */
|
/* get true return value from &status */
|
||||||
retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter);
|
device_for_each_child(&dev->dev, &status, mmio_enabled_iter);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +340,6 @@ static int slot_reset_iter(struct device *device, void *data)
|
||||||
static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
|
static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
|
pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
|
||||||
int retval;
|
|
||||||
|
|
||||||
/* If fatal, restore cfg space for possible link reset at upstream */
|
/* If fatal, restore cfg space for possible link reset at upstream */
|
||||||
if (dev->error_state == pci_channel_io_frozen) {
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get true return value from &status */
|
/* get true return value from &status */
|
||||||
retval = device_for_each_child(&dev->dev, &status, slot_reset_iter);
|
device_for_each_child(&dev->dev, &status, slot_reset_iter);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,9 +376,7 @@ static int resume_iter(struct device *device, void *data)
|
||||||
|
|
||||||
static void pcie_portdrv_err_resume(struct pci_dev *dev)
|
static void pcie_portdrv_err_resume(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
int retval;
|
device_for_each_child(&dev->dev, NULL, resume_iter);
|
||||||
/* nothing to do with error value, if it ever happens */
|
|
||||||
retval = device_for_each_child(&dev->dev, NULL, resume_iter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -261,7 +261,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
|
||||||
{
|
{
|
||||||
struct resource *res = dev->resource + resno;
|
struct resource *res = dev->resource + resno;
|
||||||
resource_size_t align, size;
|
resource_size_t align, size;
|
||||||
struct pci_bus *bus;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
align = pci_resource_alignment(dev, res);
|
align = pci_resource_alignment(dev, res);
|
||||||
|
@ -271,7 +270,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bus = dev->bus;
|
|
||||||
size = resource_size(res);
|
size = resource_size(res);
|
||||||
ret = _pci_assign_resource(dev, resno, size, align);
|
ret = _pci_assign_resource(dev, resno, size, align);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue