* [PATCH] PCI: move pci_find_saved_cap out of linux/pci.h
@ 2012-02-11 8:18 Yinghai Lu
2012-02-22 21:03 ` Bjorn Helgaas
2012-02-23 20:27 ` Jesse Barnes
0 siblings, 2 replies; 3+ messages in thread
From: Yinghai Lu @ 2012-02-11 8:18 UTC (permalink / raw)
To: Jesse Barnes; +Cc: linux-pci, linux-kernel, Yinghai Lu
Only have user in driver/pci/pci.c
Don't need to put it in global pci.h
Signed-off-by: Yinghai Lu <yinghai@kernel.org.
---
drivers/pci/pci.c | 19 +++++++++++++++++++
include/linux/pci.h | 19 -------------------
2 files changed, 19 insertions(+), 19 deletions(-)
Index: linux-2.6/drivers/pci/pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci.c
+++ linux-2.6/drivers/pci/pci.c
@@ -825,6 +825,19 @@ EXPORT_SYMBOL(pci_choose_state);
#define pcie_cap_has_sltctl2(type, flags) \
((flags & PCI_EXP_FLAGS_VERS) > 1)
+static struct pci_cap_saved_state *pci_find_saved_cap(
+ struct pci_dev *pci_dev, char cap)
+{
+ struct pci_cap_saved_state *tmp;
+ struct hlist_node *pos;
+
+ hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
+ if (tmp->cap.cap_nr == cap)
+ return tmp;
+ }
+ return NULL;
+}
+
static int pci_save_pcie_state(struct pci_dev *dev)
{
int pos, i = 0;
@@ -1869,6 +1882,12 @@ void platform_pci_wakeup_init(struct pci
platform_pci_sleep_wake(dev, false);
}
+static void pci_add_saved_cap(struct pci_dev *pci_dev,
+ struct pci_cap_saved_state *new_cap)
+{
+ hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
+}
+
/**
* pci_add_save_buffer - allocate buffer for saving given capability registers
* @dev: the PCI device
Index: linux-2.6/include/linux/pci.h
===================================================================
--- linux-2.6.orig/include/linux/pci.h
+++ linux-2.6/include/linux/pci.h
@@ -368,25 +368,6 @@ static inline int pci_channel_offline(st
return (pdev->error_state != pci_channel_io_normal);
}
-static inline struct pci_cap_saved_state *pci_find_saved_cap(
- struct pci_dev *pci_dev, char cap)
-{
- struct pci_cap_saved_state *tmp;
- struct hlist_node *pos;
-
- hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
- if (tmp->cap.cap_nr == cap)
- return tmp;
- }
- return NULL;
-}
-
-static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
- struct pci_cap_saved_state *new_cap)
-{
- hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
-}
-
/*
* The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
* to P2P or CardBus bridge windows) go in a table. Additional ones (for
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: move pci_find_saved_cap out of linux/pci.h
2012-02-11 8:18 [PATCH] PCI: move pci_find_saved_cap out of linux/pci.h Yinghai Lu
@ 2012-02-22 21:03 ` Bjorn Helgaas
2012-02-23 20:27 ` Jesse Barnes
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2012-02-22 21:03 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Jesse Barnes, linux-pci, linux-kernel
On Sat, Feb 11, 2012 at 12:18 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> Only have user in driver/pci/pci.c
>
> Don't need to put it in global pci.h
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org.
>
> ---
> drivers/pci/pci.c | 19 +++++++++++++++++++
> include/linux/pci.h | 19 -------------------
> 2 files changed, 19 insertions(+), 19 deletions(-)
>
> Index: linux-2.6/drivers/pci/pci.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/pci.c
> +++ linux-2.6/drivers/pci/pci.c
> @@ -825,6 +825,19 @@ EXPORT_SYMBOL(pci_choose_state);
> #define pcie_cap_has_sltctl2(type, flags) \
> ((flags & PCI_EXP_FLAGS_VERS) > 1)
>
> +static struct pci_cap_saved_state *pci_find_saved_cap(
> + struct pci_dev *pci_dev, char cap)
> +{
> + struct pci_cap_saved_state *tmp;
> + struct hlist_node *pos;
> +
> + hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
> + if (tmp->cap.cap_nr == cap)
> + return tmp;
> + }
> + return NULL;
> +}
> +
> static int pci_save_pcie_state(struct pci_dev *dev)
> {
> int pos, i = 0;
> @@ -1869,6 +1882,12 @@ void platform_pci_wakeup_init(struct pci
> platform_pci_sleep_wake(dev, false);
> }
>
> +static void pci_add_saved_cap(struct pci_dev *pci_dev,
> + struct pci_cap_saved_state *new_cap)
> +{
> + hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
> +}
> +
> /**
> * pci_add_save_buffer - allocate buffer for saving given capability registers
> * @dev: the PCI device
> Index: linux-2.6/include/linux/pci.h
> ===================================================================
> --- linux-2.6.orig/include/linux/pci.h
> +++ linux-2.6/include/linux/pci.h
> @@ -368,25 +368,6 @@ static inline int pci_channel_offline(st
> return (pdev->error_state != pci_channel_io_normal);
> }
>
> -static inline struct pci_cap_saved_state *pci_find_saved_cap(
> - struct pci_dev *pci_dev, char cap)
> -{
> - struct pci_cap_saved_state *tmp;
> - struct hlist_node *pos;
> -
> - hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
> - if (tmp->cap.cap_nr == cap)
> - return tmp;
> - }
> - return NULL;
> -}
> -
> -static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
> - struct pci_cap_saved_state *new_cap)
> -{
> - hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
> -}
> -
> /*
> * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
> * to P2P or CardBus bridge windows) go in a table. Additional ones (for
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: move pci_find_saved_cap out of linux/pci.h
2012-02-11 8:18 [PATCH] PCI: move pci_find_saved_cap out of linux/pci.h Yinghai Lu
2012-02-22 21:03 ` Bjorn Helgaas
@ 2012-02-23 20:27 ` Jesse Barnes
1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2012-02-23 20:27 UTC (permalink / raw)
To: Yinghai Lu; +Cc: linux-pci, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
On Sat, 11 Feb 2012 00:18:41 -0800
Yinghai Lu <yinghai@kernel.org> wrote:
> Only have user in driver/pci/pci.c
>
> Don't need to put it in global pci.h
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org.
Applied, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-23 20:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-11 8:18 [PATCH] PCI: move pci_find_saved_cap out of linux/pci.h Yinghai Lu
2012-02-22 21:03 ` Bjorn Helgaas
2012-02-23 20:27 ` Jesse Barnes
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).