From: Rajat Jain <rajatja@google.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Jonathan Corbet <corbet@lwn.net>,
Philippe Ombredanne <pombredanne@nexb.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Frederick Lawler <fred@fredlawl.com>,
Oza Pawandeep <poza@codeaurora.org>,
Keith Busch <keith.busch@intel.com>,
Alexandru Gagniuc <mr.nuke.me@gmail.com>,
Thomas Tai <thomas.tai@oracle.com>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, Jes Sorensen <jsorensen@fb.com>,
Kyle McMartin <jkkm@fb.com>,
rajatxjain@gmail.com, helgaas@kernel.org
Cc: Rajat Jain <rajatja@google.com>
Subject: [PATCH 1/4] PCI: Move pci_aer_init() and pci_no_aer() declarations to drivers/pci/pci.h
Date: Thu, 21 Jun 2018 16:48:26 -0700 [thread overview]
Message-ID: <20180621234829.224566-2-rajatja@google.com> (raw)
In-Reply-To: <20180621234829.224566-1-rajatja@google.com>
Since these functions are unsed only internally, move them to the PCI
internal header file. Also, no one cares about return value of
pci_aer_init(), so make it void.
Signed-off-by: Rajat Jain <rajatja@google.com>
---
drivers/pci/pci.h | 8 ++++++++
drivers/pci/pcie/aer.c | 4 ++--
include/linux/pci.h | 4 ----
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index c358e7a07f3f..9a1af85aca77 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -452,4 +452,12 @@ static inline int devm_of_pci_get_host_bridge_resources(struct device *dev,
}
#endif
+#ifdef CONFIG_PCIEAER
+void pci_no_aer(void);
+void pci_aer_init(struct pci_dev *dev);
+#else
+static inline void pci_no_aer(void) { }
+static inline int pci_aer_init(struct pci_dev *d) { return -ENODEV; }
+#endif
+
#endif /* DRIVERS_PCI_H */
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index a2e88386af28..11482669b93b 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -402,10 +402,10 @@ int pci_cleanup_aer_error_status_regs(struct pci_dev *dev)
return 0;
}
-int pci_aer_init(struct pci_dev *dev)
+void pci_aer_init(struct pci_dev *dev)
{
dev->aer_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
- return pci_cleanup_aer_error_status_regs(dev);
+ pci_cleanup_aer_error_status_regs(dev);
}
#define AER_AGENT_RECEIVER 0
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 340029b2fb38..b4ffea05c999 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1468,13 +1468,9 @@ static inline bool pcie_aspm_support_enabled(void) { return false; }
#endif
#ifdef CONFIG_PCIEAER
-void pci_no_aer(void);
bool pci_aer_available(void);
-int pci_aer_init(struct pci_dev *dev);
#else
-static inline void pci_no_aer(void) { }
static inline bool pci_aer_available(void) { return false; }
-static inline int pci_aer_init(struct pci_dev *d) { return -ENODEV; }
#endif
#ifdef CONFIG_PCIE_ECRC
--
2.18.0.rc2.346.g013aa6912e-goog
next prev parent reply other threads:[~2018-06-21 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 23:48 [PATCH 0/4] Expose PCIe AER stats via sysfs Rajat Jain
2018-06-21 23:48 ` Rajat Jain [this message]
2018-06-21 23:48 ` [PATCH 2/4] PCI/AER: Define and allocate aer_stats structure for AER capable devices Rajat Jain
2018-06-21 23:48 ` [PATCH 3/4] PCI/AER: Add sysfs attributes to provide AER stats and breakdown Rajat Jain
2018-06-21 23:48 ` [PATCH 4/4] PCI/AER: Add sysfs attributes for rootport cumulative stats Rajat Jain
2018-06-30 20:41 ` [PATCH 0/4] Expose PCIe AER stats via sysfs 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=20180621234829.224566-2-rajatja@google.com \
--to=rajatja@google.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=fred@fredlawl.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=jkkm@fb.com \
--cc=jsorensen@fb.com \
--cc=keith.busch@intel.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mr.nuke.me@gmail.com \
--cc=pombredanne@nexb.com \
--cc=poza@codeaurora.org \
--cc=rajatxjain@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=thomas.tai@oracle.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
all inboxes | Powered by JetHome®