Skip to content

Commit

Permalink
PCI: remove unnecessary arg of pci_update_resource()
Browse files Browse the repository at this point in the history
This cleanup removes unnecessary argument 'struct resource *res' in
pci_update_resource(), so it takes same arguments as other companion
functions (pci_assign_resource(), etc.).

Signed-off-by: Yu Zhao <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
  • Loading branch information
tylerzhao7684 authored and jbarnes993 committed Jan 7, 2009
1 parent 6a49d81 commit 14add80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ pci_restore_bars(struct pci_dev *dev)
return;
}

for (i = 0; i < numres; i ++)
pci_update_resource(dev, &dev->resource[i], i);
for (i = 0; i < numres; i++)
pci_update_resource(dev, i);
}

static struct pci_platform_pm_ops *pci_platform_pm;
Expand Down
7 changes: 4 additions & 3 deletions drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
#include "pci.h"


void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
void pci_update_resource(struct pci_dev *dev, int resno)
{
struct pci_bus_region region;
u32 new, check, mask;
int reg;
struct resource *res = dev->resource + resno;

/*
* Ignore resources for unimplemented BARs and unused resource slots
Expand Down Expand Up @@ -162,7 +163,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
} else {
res->flags &= ~IORESOURCE_STARTALIGN;
if (resno < PCI_BRIDGE_RESOURCES)
pci_update_resource(dev, res, resno);
pci_update_resource(dev, resno);
}

return ret;
Expand Down Expand Up @@ -197,7 +198,7 @@ int pci_assign_resource_fixed(struct pci_dev *dev, int resno)
dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n",
resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res);
} else if (resno < PCI_BRIDGE_RESOURCES) {
pci_update_resource(dev, res, resno);
pci_update_resource(dev, resno);
}

return ret;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ int pcie_get_readrq(struct pci_dev *dev);
int pcie_set_readrq(struct pci_dev *dev, int rq);
int pci_reset_function(struct pci_dev *dev);
int pci_execute_reset_function(struct pci_dev *dev);
void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
void pci_update_resource(struct pci_dev *dev, int resno);
int __must_check pci_assign_resource(struct pci_dev *dev, int i);
int pci_select_bars(struct pci_dev *dev, unsigned long flags);

Expand Down

0 comments on commit 14add80

Please sign in to comment.