linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: helgaas@kernel.org (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] PCI: Support for configurable PCI endpoint
Date: Tue, 11 Apr 2017 14:34:47 -0500	[thread overview]
Message-ID: <20170411193447.GA14778@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20170410154328.GB13170@bhelgaas-glaptop.roam.corp.google.com>

On Mon, Apr 10, 2017 at 10:43:28AM -0500, Bjorn Helgaas wrote:
> On Wed, Apr 05, 2017 at 02:22:20PM +0530, Kishon Vijay Abraham I wrote:
> > Hi Bjorn,
> > 
> > Please find the pull request for PCI endpoint support below. I've
> > also included all the history here.
> 
> Thanks, I applied these (with v7 of the first patch) to pci/host-designware
> for v4.12.

Ok, sorry, I screwed this up.  I think my branch actually had v5, not
v6.  But I *think* I fixed it.  Here's the diff from my branch to your
git tree.  Apparently you haven't pushed the v7 patch there, so I
*think* the diff below is the diff between v6 and v7 of that first
patch.

$ git diff pci/host-designware a5c85ba45c96
diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c
index caa7be10e473..9ae9e59b2a74 100644
--- a/drivers/pci/endpoint/pci-epc-core.c
+++ b/drivers/pci/endpoint/pci-epc-core.c
@@ -83,7 +83,6 @@ struct pci_epc *pci_epc_get(const char *epc_name)
 			goto err;
 		}
 
-		class_dev_iter_exit(&iter);
 		get_device(&epc->dev);
 		return epc;
 	}
diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c
index 6877d6a5bcc9..92db7dcd911c 100644
--- a/drivers/pci/endpoint/pci-epf-core.c
+++ b/drivers/pci/endpoint/pci-epf-core.c
@@ -40,10 +40,8 @@ static struct device_type pci_epf_type;
  */
 void pci_epf_linkup(struct pci_epf *epf)
 {
-	if (!epf->driver) {
+	if (!epf->driver)
 		dev_WARN(&epf->dev, "epf device not bound to driver\n");
-		return;
-	}
 
 	epf->driver->ops->linkup(epf);
 }
@@ -59,10 +57,8 @@ EXPORT_SYMBOL_GPL(pci_epf_linkup);
  */
 void pci_epf_unbind(struct pci_epf *epf)
 {
-	if (!epf->driver) {
+	if (!epf->driver)
 		dev_WARN(&epf->dev, "epf device not bound to driver\n");
-		return;
-	}
 
 	epf->driver->ops->unbind(epf);
 	module_put(epf->driver->owner);
@@ -78,10 +74,8 @@ EXPORT_SYMBOL_GPL(pci_epf_unbind);
  */
 int pci_epf_bind(struct pci_epf *epf)
 {
-	if (!epf->driver) {
+	if (!epf->driver)
 		dev_WARN(&epf->dev, "epf device not bound to driver\n");
-		return -EINVAL;
-	}
 
 	if (!try_module_get(epf->driver->owner))
 		return -EAGAIN;
@@ -233,7 +227,7 @@ struct pci_epf *pci_epf_create(const char *name)
 	epf->name = kstrdup(func_name, GFP_KERNEL);
 	if (!epf->name) {
 		ret = -ENOMEM;
-		goto free_func_name;
+		goto free_epf;
 	}
 
 	dev = &epf->dev;
@@ -255,8 +249,6 @@ struct pci_epf *pci_epf_create(const char *name)
 put_dev:
 	put_device(dev);
 	kfree(epf->name);
-
-free_func_name:
 	kfree(func_name);
 
 free_epf:

  reply	other threads:[~2017-04-11 19:34 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  8:52 [GIT PULL] PCI: Support for configurable PCI endpoint Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 01/23] PCI: endpoint: Add EP core layer to enable EP controller and EP functions Kishon Vijay Abraham I
2017-04-05 16:52   ` Bjorn Helgaas
2017-04-06  5:19     ` Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 02/23] Documentation: PCI: Guide to use PCI Endpoint Core Layer Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 03/23] PCI: endpoint: Introduce configfs entry for configuring EP functions Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 04/23] Documentation: PCI: Guide to use PCI endpoint configfs Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 05/23] PCI: endpoint: Create configfs entry for EPC device and EPF driver Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 06/23] Documentation: PCI: Add specification for the *PCI test* function device Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 07/23] PCI: endpoint: functions: Add an EP function to test PCI Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 08/23] Documentation: PCI: Add binding documentation for pci-test endpoint function Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 09/23] PCI: dwc: designware: Add EP mode support Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 10/23] dt-bindings: PCI: Add DT bindings for PCI designware EP mode Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 11/23] PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 12/23] PCI: dwc: dra7xx: Add EP mode support Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 13/23] dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 14/23] PCI: dwc: dra7xx: Workaround for errata id i870 Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 15/23] dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 16/23] PCI: Add device IDs for DRA74x and DRA72x Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 17/23] misc: Add host side PCI driver for PCI test function device Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 18/23] Documentation: misc-devices: Add Documentation for pci-endpoint-test driver Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 19/23] tools: PCI: Add a userspace tool to test PCI endpoint Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 20/23] tools: PCI: Add sample test script to invoke pcitest Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 21/23] Documentation: PCI: Add userguide for PCI endpoint test function Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 22/23] MAINTAINERS: Add PCI Endpoint maintainer Kishon Vijay Abraham I
2017-04-05  8:52 ` [PATCH v6 23/23] ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP Kishon Vijay Abraham I
2017-04-10 13:55 ` [PATCH v7 01/23] PCI: endpoint: Add EP core layer to enable EP controller and EP functions Kishon Vijay Abraham I
2022-12-13 23:44   ` Bjorn Helgaas
2017-04-10 15:43 ` [GIT PULL] PCI: Support for configurable PCI endpoint Bjorn Helgaas
2017-04-11 19:34   ` Bjorn Helgaas [this message]
2017-04-12  5:43     ` Kishon Vijay Abraham I
  -- strict thread matches above, loose matches on Subject: below --
2017-03-27  9:44 Kishon Vijay Abraham I
2017-03-29 11:42 ` Niklas Cassel
2017-03-29 12:10   ` Kishon Vijay Abraham I
2017-03-29 12:36     ` Kishon Vijay Abraham I
2017-03-29 13:13       ` Niklas Cassel
2017-04-04 20:36 ` Bjorn Helgaas
2017-04-05  8:47   ` Kishon Vijay Abraham I

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=20170411193447.GA14778@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).