All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: linuxppc-dev@lists.ozlabs.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	David Gibson <david@gibson.dropbear.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Alistair Popple <alistair@popple.id.au>,
	Russell Currey <ruscur@russell.cc>
Subject: [PATCH kernel 1/5] powerpc/pci: Remove unused parameter from add_one_dev_pci_data()
Date: Wed, 23 Aug 2017 20:18:57 +1000	[thread overview]
Message-ID: <20170823101901.33961-2-aik@ozlabs.ru> (raw)
In-Reply-To: <20170823101901.33961-1-aik@ozlabs.ru>

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>
---
 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) {
-- 
2.11.0

  reply	other threads:[~2017-08-23 10:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 10:18 [PATCH kernel 0/5] powerpc/eeh: Some cleanups Alexey Kardashevskiy
2017-08-23 10:18 ` Alexey Kardashevskiy [this message]
2017-08-23 10:18 ` [PATCH kernel 2/5] powerpc/eeh: Reduce to one the number of places where edev is allocated Alexey Kardashevskiy
2017-08-23 10:18 ` [PATCH kernel 3/5] powerpc/eeh: Remove unnecessary pointer to phb from eeh_dev Alexey Kardashevskiy
2017-08-24  4:45   ` Andrew Donnellan
2017-08-28  6:25   ` Michael Ellerman
2017-08-23 10:19 ` [PATCH kernel 4/5] powerpc/eeh: Remove unnecessary config_addr " Alexey Kardashevskiy
2017-08-28  6:27   ` Michael Ellerman
2017-08-23 10:19 ` [PATCH kernel 5/5] powerpc/eeh: Remove unnecessary node from pci_dn Alexey Kardashevskiy
2017-08-28  6:27   ` Michael Ellerman
2017-08-24  1:13 ` [PATCH kernel 0/5] powerpc/eeh: Some cleanups Russell Currey
2017-08-24  2:19   ` Alexey Kardashevskiy
2017-08-24  5:29     ` Andrew Donnellan
     [not found] ` <20170823102823.7F12CC603E@b03ledav006.gho.boulder.ibm.com>
2017-08-24  4:21   ` [PATCH kernel 1/5] powerpc/pci: Remove unused parameter from add_one_dev_pci_data() Andrew Donnellan
     [not found] ` <20170823101926.03970124035@b01ledav002.gho.pok.ibm.com>
2017-08-24  4:34   ` [PATCH kernel 2/5] powerpc/eeh: Reduce to one the number of places where edev is allocated Andrew Donnellan
     [not found] ` <20170823102546.29A77AE034@b01ledav005.gho.pok.ibm.com>
2017-08-24  4:55   ` [PATCH kernel 4/5] powerpc/eeh: Remove unnecessary config_addr from eeh_dev Andrew Donnellan
     [not found] ` <20170823102629.539BD2803A@b01ledav001.gho.pok.ibm.com>
2017-08-24  5:19   ` [PATCH kernel 5/5] powerpc/eeh: Remove unnecessary node from pci_dn Andrew Donnellan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170823101901.33961-2-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=alistair@popple.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ruscur@russell.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.