From: Alex Williamson <alex.williamson@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] PCI: Make pci_cap_saved_state private to core
Date: Mon, 2 Aug 2021 13:17:04 -0600 [thread overview]
Message-ID: <20210802131704.0a212f89.alex.williamson@redhat.com> (raw)
In-Reply-To: <20210728231447.869117-1-helgaas@kernel.org>
On Wed, 28 Jul 2021 18:14:47 -0500
Bjorn Helgaas <helgaas@kernel.org> wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> struct pci_cap_saved_data and struct pci_cap_saved_state were declared in
> include/linux/pci.h, but aren't needed outside drivers/pci/. Move them to
> drivers/pci/pci.h.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> drivers/pci/pci.h | 17 +++++++++++++++--
> include/linux/pci.h | 12 ------------
> 2 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> index 93dcdd431072..ab5a989e6580 100644
> --- a/drivers/pci/pci.h
> +++ b/drivers/pci/pci.h
> @@ -37,6 +37,21 @@ int pci_probe_reset_function(struct pci_dev *dev);
> int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
> int pci_bus_error_reset(struct pci_dev *dev);
>
> +struct pci_cap_saved_data {
> + u16 cap_nr;
> + bool cap_extended;
> + unsigned int size;
> + u32 data[];
> +};
> +
> +struct pci_cap_saved_state {
> + struct hlist_node next;
> + struct pci_cap_saved_data cap;
> +};
> +
> +void pci_allocate_cap_save_buffers(struct pci_dev *dev);
> +void pci_free_cap_save_buffers(struct pci_dev *dev);
> +
> #define PCI_PM_D2_DELAY 200 /* usec; see PCIe r4.0, sec 5.9.1 */
> #define PCI_PM_D3HOT_WAIT 10 /* msec */
> #define PCI_PM_D3COLD_WAIT 100 /* msec */
> @@ -100,8 +115,6 @@ void pci_pm_init(struct pci_dev *dev);
> void pci_ea_init(struct pci_dev *dev);
> void pci_msi_init(struct pci_dev *dev);
> void pci_msix_init(struct pci_dev *dev);
> -void pci_allocate_cap_save_buffers(struct pci_dev *dev);
> -void pci_free_cap_save_buffers(struct pci_dev *dev);
> bool pci_bridge_d3_possible(struct pci_dev *dev);
> void pci_bridge_d3_update(struct pci_dev *dev);
> void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev);
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 540b377ca8f6..2ceeb5e9f28a 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -288,18 +288,6 @@ enum pci_bus_speed {
> enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
> enum pcie_link_width pcie_get_width_cap(struct pci_dev *dev);
>
> -struct pci_cap_saved_data {
> - u16 cap_nr;
> - bool cap_extended;
> - unsigned int size;
> - u32 data[];
> -};
> -
> -struct pci_cap_saved_state {
> - struct hlist_node next;
> - struct pci_cap_saved_data cap;
> -};
> -
> struct irq_affinity;
> struct pcie_link_state;
> struct pci_vpd;
Do you want to move these from include/linux/pci.h as well?
struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap);
struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev, u16 cap);
Thanks,
Alex
next prev parent reply other threads:[~2021-08-02 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 23:14 [PATCH] PCI: Make pci_cap_saved_state private to core Bjorn Helgaas
2021-08-02 19:17 ` Alex Williamson [this message]
2021-08-02 22:10 ` 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=20210802131704.0a212f89.alex.williamson@redhat.com \
--to=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.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).