summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2017-08-29 03:33:59 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2017-08-31 00:26:07 -0400
commit5f600b17d190aa0e4011557fd6abb05908a53a0d (patch)
tree0ad50f7147c3748f35d695178029c382494bb181
parent9e2b70fbbc451cc56863644f6e7349148f7482cf (diff)
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: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/pci_dn.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 592693437070..0256372b72de 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -139,7 +139,6 @@ struct pci_dn *pci_get_pdn(struct pci_dev *pdev)
139 139
140#ifdef CONFIG_PCI_IOV 140#ifdef CONFIG_PCI_IOV
141static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent, 141static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
142 struct pci_dev *pdev,
143 int vf_index, 142 int vf_index,
144 int busno, int devfn) 143 int busno, int devfn)
145{ 144{
@@ -150,10 +149,8 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
150 return NULL; 149 return NULL;
151 150
152 pdn = kzalloc(sizeof(*pdn), GFP_KERNEL); 151 pdn = kzalloc(sizeof(*pdn), GFP_KERNEL);
153 if (!pdn) { 152 if (!pdn)
154 dev_warn(&pdev->dev, "%s: Out of memory!\n", __func__);
155 return NULL; 153 return NULL;
156 }
157 154
158 pdn->phb = parent->phb; 155 pdn->phb = parent->phb;
159 pdn->parent = parent; 156 pdn->parent = parent;
@@ -167,13 +164,6 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
167 INIT_LIST_HEAD(&pdn->list); 164 INIT_LIST_HEAD(&pdn->list);
168 list_add_tail(&pdn->list, &parent->child_list); 165 list_add_tail(&pdn->list, &parent->child_list);
169 166
170 /*
171 * If we already have PCI device instance, lets
172 * bind them.
173 */
174 if (pdev)
175 pdev->dev.archdata.pci_data = pdn;
176
177 return pdn; 167 return pdn;
178} 168}
179#endif 169#endif
@@ -201,7 +191,7 @@ struct pci_dn *add_dev_pci_data(struct pci_dev *pdev)
201 for (i = 0; i < pci_sriov_get_totalvfs(pdev); i++) { 191 for (i = 0; i < pci_sriov_get_totalvfs(pdev); i++) {
202 struct eeh_dev *edev __maybe_unused; 192 struct eeh_dev *edev __maybe_unused;
203 193
204 pdn = add_one_dev_pci_data(parent, NULL, i, 194 pdn = add_one_dev_pci_data(parent, i,
205 pci_iov_virtfn_bus(pdev, i), 195 pci_iov_virtfn_bus(pdev, i),
206 pci_iov_virtfn_devfn(pdev, i)); 196 pci_iov_virtfn_devfn(pdev, i));
207 if (!pdn) { 197 if (!pdn) {