Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Joao Pinto <jpinto@synopsys.com>,
	Pratyush Anand <pratyush.anand@gmail.com>
Cc: Jingoo Han <jingoohan1@gmail.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	linux-samsung-soc@vger.kernel.org, linux-pci@vger.kernel.org
Subject: [PATCH v2 01/10] PCI: designware: Rename dw_pcie_valid_config() to dw_pcie_valid_device()
Date: Wed, 12 Oct 2016 08:17:50 -0500	[thread overview]
Message-ID: <20161012131750.26443.65705.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20161012131616.26443.89407.stgit@bhelgaas-glaptop2.roam.corp.google.com>

Rename dw_pcie_valid_config() to dw_pcie_valid_device() and use the result
directly as a boolean value instead of testing against 0.  No functional
change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pcie-designware.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 74da71e..b58f078 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -760,8 +760,8 @@ static int dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus,
 	return ret;
 }
 
-static int dw_pcie_valid_config(struct pcie_port *pp,
-				struct pci_bus *bus, int dev)
+static int dw_pcie_valid_device(struct pcie_port *pp, struct pci_bus *bus,
+				int dev)
 {
 	/* If there is no link, then there is no device */
 	if (bus->number != pp->root_bus_nr) {
@@ -781,7 +781,7 @@ static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
 {
 	struct pcie_port *pp = bus->sysdata;
 
-	if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) {
+	if (!dw_pcie_valid_device(pp, bus, PCI_SLOT(devfn))) {
 		*val = 0xffffffff;
 		return PCIBIOS_DEVICE_NOT_FOUND;
 	}
@@ -797,7 +797,7 @@ static int dw_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
 {
 	struct pcie_port *pp = bus->sysdata;
 
-	if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0)
+	if (!dw_pcie_valid_device(pp, bus, PCI_SLOT(devfn)))
 		return PCIBIOS_DEVICE_NOT_FOUND;
 
 	if (bus->number == pp->root_bus_nr)


  reply	other threads:[~2016-10-12 13:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 13:17 [PATCH v2 00/10] PCI: designware: Cleanups Bjorn Helgaas
2016-10-12 13:17 ` Bjorn Helgaas [this message]
2016-10-12 13:17 ` [PATCH v2 02/10] PCI: designware: Simplify dw_pcie_readl_unroll(), dw_pcie_writel_unroll() Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 03/10] PCI: designware: Simplify pcie_host_ops.readl_rc() and .writel_rc() interfaces Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 04/10] PCI: designware: Swap order of dw_pcie_writel_rc() reg/val arguments Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 05/10] PCI: designware: Export dw_pcie_readl_rc(), dw_pcie_writel_rc() Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 06/10] PCI: designware: Uninline register accessors Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 07/10] PCI: designware: Swap order of dw_pcie_writel_unroll() reg/val arguments Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 08/10] PCI: designware-plat: Remove redundant dw_plat_pcie.mem_base Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 09/10] PCI: designware-plat: Add local struct device pointers Bjorn Helgaas
2016-10-12 13:19 ` [PATCH v2 10/10] PCI: designware-plat: Remove unused platform data Bjorn Helgaas
2016-10-12 16:04 ` [PATCH v2 00/10] PCI: designware: Cleanups Bjorn Helgaas

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=20161012131750.26443.65705.stgit@bhelgaas-glaptop2.roam.corp.google.com \
    --to=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=jpinto@synopsys.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=pratyush.anand@gmail.com \
    /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