Commit 5f600b17 authored by Alexey Kardashevskiy's avatar Alexey Kardashevskiy Committed by Michael Ellerman

powerpc/pci: Remove unused parameter from add_one_dev_pci_data()

pdev is always NULL, remove it.

To make checkpatch.pl happy, this also removes the "out of memory"
message.
Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: default avatarRussell Currey <ruscur@russell.cc>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 9e2b70fb
...@@ -139,7 +139,6 @@ struct pci_dn *pci_get_pdn(struct pci_dev *pdev) ...@@ -139,7 +139,6 @@ struct pci_dn *pci_get_pdn(struct pci_dev *pdev)
#ifdef CONFIG_PCI_IOV #ifdef CONFIG_PCI_IOV
static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent, static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
struct pci_dev *pdev,
int vf_index, int vf_index,
int busno, int devfn) int busno, int devfn)
{ {
...@@ -150,10 +149,8 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent, ...@@ -150,10 +149,8 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
return NULL; return NULL;
pdn = kzalloc(sizeof(*pdn), GFP_KERNEL); pdn = kzalloc(sizeof(*pdn), GFP_KERNEL);
if (!pdn) { if (!pdn)
dev_warn(&pdev->dev, "%s: Out of memory!\n", __func__);
return NULL; return NULL;
}
pdn->phb = parent->phb; pdn->phb = parent->phb;
pdn->parent = parent; pdn->parent = parent;
...@@ -167,13 +164,6 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent, ...@@ -167,13 +164,6 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
INIT_LIST_HEAD(&pdn->list); INIT_LIST_HEAD(&pdn->list);
list_add_tail(&pdn->list, &parent->child_list); list_add_tail(&pdn->list, &parent->child_list);
/*
* If we already have PCI device instance, lets
* bind them.
*/
if (pdev)
pdev->dev.archdata.pci_data = pdn;
return pdn; return pdn;
} }
#endif #endif
...@@ -201,7 +191,7 @@ struct pci_dn *add_dev_pci_data(struct pci_dev *pdev) ...@@ -201,7 +191,7 @@ struct pci_dn *add_dev_pci_data(struct pci_dev *pdev)
for (i = 0; i < pci_sriov_get_totalvfs(pdev); i++) { for (i = 0; i < pci_sriov_get_totalvfs(pdev); i++) {
struct eeh_dev *edev __maybe_unused; struct eeh_dev *edev __maybe_unused;
pdn = add_one_dev_pci_data(parent, NULL, i, pdn = add_one_dev_pci_data(parent, i,
pci_iov_virtfn_bus(pdev, i), pci_iov_virtfn_bus(pdev, i),
pci_iov_virtfn_devfn(pdev, i)); pci_iov_virtfn_devfn(pdev, i));
if (!pdn) { if (!pdn) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment