From: Saheed Olayemi Bolarinwa <refactormyself@gmail.com>
To: helgaas@kernel.org
Cc: , Mike Marciniszyn <mike.marciniszyn@intel.com>,
linuxppc-dev@lists.ozlabs.org,
"Greg Kroah-Hartman linux-rdma @ vger . kernel . org"
<gregkh@linuxfoundation.org>, Arnd Bergmann <arnd@arndb.de>,
Jason Gunthorpe <jgg@ziepe.ca>,
Sam Bobroff <sbobroff@linux.ibm.com>,
Bolarinwa Olayemi Saheed <refactormyself@gmail.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
skhan@linuxfoundation.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org, wunner.de@lists.ozlabs.org,
linux-acpi@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
linux-pci@vger.kernel.org, bjorn@helgaas.com,
Oliver O'Halloran <oohall@gmail.com>,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-rdma@vger.kernel.org
Subject: [PATCH 11/11 RFC] PCI: Remove "*val = 0" from pcie_capability_read_*()
Date: Mon, 6 Jul 2020 11:31:21 +0200 [thread overview]
Message-ID: <20200706093121.9731-12-refactormyself@gmail.com> (raw)
In-Reply-To: <20200706093121.9731-1-refactormyself@gmail.com>
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
prev parent reply other threads:[~2020-07-06 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20200706093121.9731-12-refactormyself@gmail.com \
--to=refactormyself@gmail.com \
--cc=arnd@arndb.de \
--cc=bjorn@helgaas.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mike.marciniszyn@intel.com \
--cc=oohall@gmail.com \
--cc=rjw@rjwysocki.net \
--cc=sbobroff@linux.ibm.com \
--cc=skhan@linuxfoundation.org \
--cc=wunner.de@lists.ozlabs.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).