Thread (1 message) 1 message, 1 author, 2017-08-24

Re: [PATCH kernel 1/5] powerpc/pci: Remove unused parameter from add_one_dev_pci_data()

From: Andrew Donnellan <hidden>
Date: 2017-08-24 04:22:02

On 23/08/17 20:18, Alexey Kardashevskiy wrote:
pdev is always NULL, remove it.

To make checkpatch.pl happy, this also removes the "out of memory"
message.

Signed-off-by: Alexey Kardashevskiy <redacted>
Reviewed-by: Andrew Donnellan <redacted>
quoted hunk
---
  arch/powerpc/kernel/pci_dn.c | 14 ++------------
  1 file 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)
  
  #ifdef CONFIG_PCI_IOV
  static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
-					   struct pci_dev *pdev,
  					   int vf_index,
  					   int busno, int devfn)
  {
@@ -150,10 +149,8 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
  		return NULL;
  
  	pdn = kzalloc(sizeof(*pdn), GFP_KERNEL);
-	if (!pdn) {
-		dev_warn(&pdev->dev, "%s: Out of memory!\n", __func__);
+	if (!pdn)
  		return NULL;
-	}
  
  	pdn->phb = parent->phb;
  	pdn->parent = parent;
@@ -167,13 +164,6 @@ static struct pci_dn *add_one_dev_pci_data(struct pci_dn *parent,
  	INIT_LIST_HEAD(&pdn->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;
  }
  #endif
@@ -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++) {
  		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_devfn(pdev, i));
  		if (!pdn) {
-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help