linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/11 RFC] PCI: Remove "*val = 0" from pcie_capability_read_*()
@ 2020-07-06  9:31 Saheed Olayemi Bolarinwa
  2020-07-06  9:31 ` [PATCH 11/11 " Saheed Olayemi Bolarinwa
  0 siblings, 1 reply; 2+ messages in thread
From: Saheed Olayemi Bolarinwa @ 2020-07-06  9:31 UTC (permalink / raw)
  To: helgaas
  Cc: Mike Marciniszyn, linuxppc-dev,
	Greg Kroah-Hartman linux-rdma @ vger . kernel . org,
	Arnd Bergmann, Jason Gunthorpe, Sam Bobroff,
	Bolarinwa Olayemi Saheed, Dennis Dalessandro, skhan,
	Rafael J. Wysocki, linux-kernel, wunner.de, linux-acpi,
	Doug Ledford, linux-pci, bjorn, Oliver O'Halloran,
	linux-kernel-mentees, linux-rdma

From: Bolarinwa Olayemi Saheed <refactormyself@gmail.com>

*** BLURB HERE ***

Bolarinwa Olayemi Saheed (9):
  IB/hfi1: Confirm that pcie_capability_read_dword() is successful
  misc: rtsx: Confirm that pcie_capability_read_word() is successful
  PCI/AER: Use error return value from pcie_capability_read_*()
  PCI/ASPM: Use error return value from pcie_capability_read_*()
  PCI: pciehp: Fix wrong failure check on pcie_capability_read_*()
  PCI: pciehp: Prevent wrong failure check on pcie_capability_read_*()
  PCI: pciehp: Make "Power On" the default in pciehp_get_power_status()
  PCI/ACPI: Prevent wrong failure check on pcie_capability_read_*()
  PCI: Prevent wrong failure check on pcie_capability_read_*()
  PCI: Remove "*val = 0" fom pcie_capability_read_*()

 
 drivers/infiniband/hw/hfi1/aspm.c | 7 ++++---
 drivers/misc/cardreader/rts5227.c | 5 +++--
 drivers/misc/cardreader/rts5249.c | 5 +++--
 drivers/misc/cardreader/rts5260.c | 5 +++--
 drivers/misc/cardreader/rts5261.c | 5 +++--
 drivers/pci/pcie/aer.c  |  5 +++--
 drivers/pci/pcie/aspm.c | 33 +++++++++++++++++----------------
 drivers/pci/hotplug/pciehp_hpc.c | 47 ++++++++++++++++----------------
 drivers/pci/pci-acpi.c           | 10 ++++---
 drivers/pci/probe.c              | 29 ++++++++++++--------
 drivers/pci/access.c | 14 --------------
 11 files changed, 82 insertions(+), 83 deletions(-)

-- 
2.18.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 11/11 RFC] PCI: Remove "*val = 0" from pcie_capability_read_*()
  2020-07-06  9:31 [PATCH 0/11 RFC] PCI: Remove "*val = 0" from pcie_capability_read_*() Saheed Olayemi Bolarinwa
@ 2020-07-06  9:31 ` Saheed Olayemi Bolarinwa
  0 siblings, 0 replies; 2+ messages in thread
From: Saheed Olayemi Bolarinwa @ 2020-07-06  9:31 UTC (permalink / raw)
  To: helgaas
  Cc: Mike Marciniszyn, linuxppc-dev,
	Greg Kroah-Hartman linux-rdma @ vger . kernel . org,
	Arnd Bergmann, Jason Gunthorpe, Sam Bobroff,
	Bolarinwa Olayemi Saheed, Dennis Dalessandro, skhan,
	Rafael J. Wysocki, linux-kernel, wunner.de, linux-acpi,
	Doug Ledford, linux-pci, bjorn, Oliver O'Halloran,
	linux-kernel-mentees, linux-rdma

From: Bolarinwa Olayemi Saheed <refactormyself@gmail.com>

 **TODO**

Suggested-by: Bjorn Helgaas <bjorn@helgaas.com>
Signed-off-by: Bolarinwa Olayemi Saheed <refactormyself@gmail.com>
---
This patch  depends on all of the preceeding patches in this series,
otherwise it will introduce bugs as pointed out in the commit message
of each.
 drivers/pci/access.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 79c4a2ef269a..ec95edbb1ac8 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -413,13 +413,6 @@ int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val)
 
 	if (pcie_capability_reg_implemented(dev, pos)) {
 		ret = pci_read_config_word(dev, pci_pcie_cap(dev) + pos, val);
-		/*
-		 * Reset *val to 0 if pci_read_config_word() fails, it may
-		 * have been written as 0xFFFF if hardware error happens
-		 * during pci_read_config_word().
-		 */
-		if (ret)
-			*val = 0;
 		return ret;
 	}
 
@@ -448,13 +441,6 @@ int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val)
 
 	if (pcie_capability_reg_implemented(dev, pos)) {
 		ret = pci_read_config_dword(dev, pci_pcie_cap(dev) + pos, val);
-		/*
-		 * Reset *val to 0 if pci_read_config_dword() fails, it may
-		 * have been written as 0xFFFFFFFF if hardware error happens
-		 * during pci_read_config_dword().
-		 */
-		if (ret)
-			*val = 0;
 		return ret;
 	}
 
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-06 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-06  9:31 [PATCH 0/11 RFC] PCI: Remove "*val = 0" from pcie_capability_read_*() Saheed Olayemi Bolarinwa
2020-07-06  9:31 ` [PATCH 11/11 " Saheed Olayemi Bolarinwa

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).