All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huacai Chen <chenhc@lemote.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	linux-pci@vger.kernel.org, Huacai Chen <chenhuacai@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Huacai Chen <chenhc@lemote.com>
Subject: [PATCH 1/2] PCI/portdrv: Remove the .remove() method in pcie_portdriver
Date: Fri, 11 Sep 2020 18:09:36 +0800	[thread overview]
Message-ID: <1599818977-25425-1-git-send-email-chenhc@lemote.com> (raw)

As Bjorn Helgaas said, portdrv can only be built statically (not as a
module), so the .remove() method in pcie_portdriver is useless. So just
remove it.

BTW, rename pcie_portdrv_remove() to pcie_portdrv_shutdown() since it
is only used by the .shutdown() method now.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 drivers/pci/pcie/portdrv_pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 3a3ce40..4e0af0f 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -134,7 +134,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 	return 0;
 }
 
-static void pcie_portdrv_remove(struct pci_dev *dev)
+static void pcie_portdrv_shutdown(struct pci_dev *dev)
 {
 	if (pci_bridge_d3_possible(dev)) {
 		pm_runtime_forbid(&dev->dev);
@@ -210,8 +210,7 @@ static struct pci_driver pcie_portdriver = {
 	.id_table	= &port_pci_ids[0],
 
 	.probe		= pcie_portdrv_probe,
-	.remove		= pcie_portdrv_remove,
-	.shutdown	= pcie_portdrv_remove,
+	.shutdown	= pcie_portdrv_shutdown,
 
 	.err_handler	= &pcie_portdrv_err_handler,
 
-- 
2.7.0


             reply	other threads:[~2020-09-11 10:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 10:09 Huacai Chen [this message]
2020-09-11 10:09 ` [PATCH 2/2] PCI/portdrv: Don't disable pci device during shutdown Huacai Chen
2020-09-13 16:04   ` Bjorn Helgaas
2020-09-14 20:43     ` Deucher, Alexander
2020-09-13  5:01 ` [PATCH 1/2] PCI/portdrv: Remove the .remove() method in pcie_portdriver Lukas Wunner
2020-09-13 15:42   ` Bjorn Helgaas
2020-09-14 20:34     ` Deucher, Alexander
2020-09-14 22:03       ` Bjorn Helgaas
2020-09-15  2:50       ` Lukas Wunner

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=1599818977-25425-1-git-send-email-chenhc@lemote.com \
    --to=chenhc@lemote.com \
    --cc=alexander.deucher@amd.com \
    --cc=bhelgaas@google.com \
    --cc=chenhuacai@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-pci@vger.kernel.org \
    /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.