linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
To: helgaas@kernel.org, Russell King <linux@armlinux.org.uk>
Cc: "Saheed O. Bolarinwa" <refactormyself@gmail.com>,
	bjorn@helgaas.com, skhan@linuxfoundation.org,
	linux-pci@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 32/35] arm/PCI: Change PCIBIOS_SUCCESSFUL to 0
Date: Mon, 13 Jul 2020 14:22:44 +0200	[thread overview]
Message-ID: <20200713122247.10985-33-refactormyself@gmail.com> (raw)
In-Reply-To: <20200713122247.10985-1-refactormyself@gmail.com>

In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept.
Their scope should be limited within arch/x86.

Change all PCIBIOS_SUCCESSFUL to 0

Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
---
 arch/arm/common/it8152.c           | 4 ++--
 arch/arm/mach-cns3xxx/pcie.c       | 2 +-
 arch/arm/mach-footbridge/dc21285.c | 4 ++--
 arch/arm/mach-iop32x/pci.c         | 6 +++---
 arch/arm/mach-ixp4xx/common-pci.c  | 8 ++++----
 arch/arm/mach-orion5x/pci.c        | 4 ++--
 arch/arm/plat-orion/pcie.c         | 8 ++++----
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 9ec740cac469..331911b627c4 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -186,7 +186,7 @@ static int it8152_pci_read_config(struct pci_bus *bus,
 
 	*value = v;
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static int it8152_pci_write_config(struct pci_bus *bus,
@@ -216,7 +216,7 @@ static int it8152_pci_write_config(struct pci_bus *bus,
 	__raw_writel((addr + where), IT8152_PCI_CFG_ADDR);
 	__raw_writel((v | vtemp), IT8152_PCI_CFG_DATA);
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 struct pci_ops it8152_ops = {
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index e92fbd679dfb..7020071a2dc5 100644
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c
@@ -92,7 +92,7 @@ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
 
 	ret = pci_generic_config_read(bus, devfn, where, size, val);
 
-	if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
+	if (ret == 0 && !bus->number && !devfn &&
 	    (where & 0xffc) == PCI_CLASS_REVISION)
 		/*
 		 * RC's class is 0xb, but Linux PCI driver needs 0x604
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index 416462e3f5d6..5ad78b38c659 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -86,7 +86,7 @@ dc21285_read_config(struct pci_bus *bus, unsigned int devfn, int where,
 		return -1;
 	}
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static int
@@ -121,7 +121,7 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where,
 		return -1;
 	}
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 struct pci_ops dc21285_ops = {
diff --git a/arch/arm/mach-iop32x/pci.c b/arch/arm/mach-iop32x/pci.c
index ab0010dc3145..a29d33ce20c8 100644
--- a/arch/arm/mach-iop32x/pci.c
+++ b/arch/arm/mach-iop32x/pci.c
@@ -118,7 +118,7 @@ iop3xx_read_config(struct pci_bus *bus, unsigned int devfn, int where,
 
 	*value = val;
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static int
@@ -131,7 +131,7 @@ iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where,
 	if (size != 4) {
 		val = iop3xx_read(addr);
 		if (iop3xx_pci_status())
-			return PCIBIOS_SUCCESSFUL;
+			return 0;
 
 		where = (where & 3) * 8;
 
@@ -154,7 +154,7 @@ iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where,
 			  "r" (IOP3XX_OCCAR), "r" (IOP3XX_OCCDR));
 	}
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 struct pci_ops iop3xx_ops = {
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 893c19c254e3..f7cd535d4971 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -208,7 +208,7 @@ static int local_read_config(int where, int size, u32 *value)
 	crp_read(where & ~3, &data);
 	*value = (data >> (8*n)) & bytemask[size];
 	pr_debug("local_read_config read %#x\n", *value);
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static int local_write_config(int where, int size, u32 value)
@@ -221,7 +221,7 @@ static int local_write_config(int where, int size, u32 value)
 		return PCIBIOS_BAD_REGISTER_NUMBER;
 	data = value << (8*n);
 	crp_write((where & ~3) | byte_enables, data);
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static u32 byte_lane_enable_bits(u32 n, int size)
@@ -255,7 +255,7 @@ static int ixp4xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, int w
 
 	*value = (data >> (8*n)) & bytemask[size];
 	pr_debug("read_config_byte read %#x\n", *value);
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static int ixp4xx_pci_write_config(struct pci_bus *bus,  unsigned int devfn, int where, int size, u32 value)
@@ -276,7 +276,7 @@ static int ixp4xx_pci_write_config(struct pci_bus *bus,  unsigned int devfn, int
 	if (ixp4xx_pci_write(addr, byte_enables | NP_CMD_CONFIGWRITE, data))
 		return PCIBIOS_DEVICE_NOT_FOUND;
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 struct pci_ops ixp4xx_ops = {
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index 76951bfbacf5..2b587225e244 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -289,14 +289,14 @@ static int orion5x_pci_hw_rd_conf(int bus, int dev, u32 func,
 
 	spin_unlock_irqrestore(&orion5x_pci_lock, flags);
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 static int orion5x_pci_hw_wr_conf(int bus, int dev, u32 func,
 					u32 where, u32 size, u32 val)
 {
 	unsigned long flags;
-	int ret = PCIBIOS_SUCCESSFUL;
+	int ret = 0;
 
 	spin_lock_irqsave(&orion5x_pci_lock, flags);
 
diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/plat-orion/pcie.c
index 8b8c06d2e9c4..6fb142f893ac 100644
--- a/arch/arm/plat-orion/pcie.c
+++ b/arch/arm/plat-orion/pcie.c
@@ -221,7 +221,7 @@ int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus,
 	else if (size == 2)
 		*val = (*val >> (8 * (where & 3))) & 0xffff;
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus,
@@ -244,7 +244,7 @@ int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus,
 	else if (size == 2)
 		*val = (*val >> (8 * (where & 3))) & 0xffff;
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus,
@@ -260,13 +260,13 @@ int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus,
 	else if (size == 2)
 		*val = (*val >> (8 * (where & 3))) & 0xffff;
 
-	return PCIBIOS_SUCCESSFUL;
+	return 0;
 }
 
 int orion_pcie_wr_conf(void __iomem *base, struct pci_bus *bus,
 		       u32 devfn, int where, int size, u32 val)
 {
-	int ret = PCIBIOS_SUCCESSFUL;
+	int ret = 0;
 
 	writel(PCIE_CONF_BUS(bus->number) |
 		PCIE_CONF_DEV(PCI_SLOT(devfn)) |
-- 
2.18.2


  parent reply	other threads:[~2020-07-13 13:24 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200713122247.10985-1-refactormyself@gmail.com>
2020-07-13 12:22 ` [RFC PATCH 01/35] xen-pciback: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 02/35] ssb: " Saheed O. Bolarinwa
2020-07-13 17:16   ` Larry Finger
2020-07-13 19:13     ` Saheed Bolarinwa
2020-07-13 18:29       ` Arnd Bergmann
2020-07-13 18:35       ` Larry Finger
2020-07-13 12:22 ` [RFC PATCH 03/35] scsi: ipr: " Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 04/35] scsi: ipr: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 05/35] PCI: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 06/35] PCI: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 13:59   ` Gustavo Pimentel
2020-07-13 12:22 ` [RFC PATCH 07/35] PCI: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 08/35] PCI: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 09/35] nvme-pci: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 16:42   ` Rajashekar, Revanth
2020-07-13 18:24     ` Saheed Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 10/35] nvme-pci: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 11/35] r8169: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 12/35] r8169: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 13:45   ` Heiner Kallweit
2020-07-13 13:09     ` Saheed Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 13/35] cxl: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 14/35] i2c/busses: " Saheed O. Bolarinwa
2020-07-17 14:58   ` Jean Delvare
2020-07-18 19:05     ` Saheed Bolarinwa
2020-07-22 11:06       ` Wolfram Sang
2020-07-13 12:22 ` [RFC PATCH 15/35] i2c/busses: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-17 15:11   ` Jean Delvare
2020-07-13 12:22 ` [RFC PATCH 16/35] hwmon: (sis5595) Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-14  5:02   ` Guenter Roeck
2020-07-13 12:22 ` [RFC PATCH 17/35] hwmon: (sis5595) Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-14  5:04   ` Guenter Roeck
2020-07-13 12:22 ` [RFC PATCH 18/35] bcma: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 19/35] atm: " Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 20/35] atm: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 21/35] atm: Fix Style ERROR- assignment in if condition Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 22/35] unicore32: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 23/35] sparc/PCI: " Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 24/35] sh: " Saheed O. Bolarinwa
2020-07-20 21:41   ` Rich Felker
2020-07-13 12:22 ` [RFC PATCH 25/35] sh: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 26/35] powerpc: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 27/35] powerpc: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 28/35] mips: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 29/35] mips: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 30/35] microblaze: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 31/35] m68k: " Saheed O. Bolarinwa
2020-07-13 12:22 ` Saheed O. Bolarinwa [this message]
2020-07-13 12:22 ` [RFC PATCH 33/35] arm/PCI: Tidy Success/Failure checks Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 34/35] PCI: Change PCIBIOS_SUCCESSFUL to 0 Saheed O. Bolarinwa
2020-07-13 12:22 ` [RFC PATCH 35/35] alpha: Tidy Success/Failure checks Saheed O. Bolarinwa

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=20200713122247.10985-33-refactormyself@gmail.com \
    --to=refactormyself@gmail.com \
    --cc=bjorn@helgaas.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=skhan@linuxfoundation.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).