* [PATCH 0/7] arch: pci_find_device remove
@ 2005-08-29 22:20 Jiri Slaby
2005-08-29 22:24 ` [PATCH 1/7] arch: pci_find_device remove (alpha/kernel/sys_alcor.c) Jiri Slaby
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:20 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci
Set of patches, which removes pci_find_device from arch subtree.
alpha/kernel/sys_alcor.c | 3 ++-
alpha/kernel/sys_sio.c | 6 +++---
frv/mb93090-mb00/pci-frv.c | 8 ++------
frv/mb93090-mb00/pci-irq.c | 4 +---
ppc/kernel/pci.c | 21 +++++++++++----------
ppc/platforms/85xx/mpc85xx_cds_common.c | 11 +++++++----
sparc64/kernel/ebus.c | 17 ++++++-----------
7 files changed, 32 insertions(+), 38 deletions(-)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/7] arch: pci_find_device remove (alpha/kernel/sys_alcor.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
@ 2005-08-29 22:24 ` Jiri Slaby
2005-08-29 22:25 ` [PATCH 2/7] arch: pci_find_device remove (alpha/kernel/sys_sio.c) Jiri Slaby
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:24 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci, rth, ink
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
sys_alcor.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
--- a/arch/alpha/kernel/sys_alcor.c
+++ b/arch/alpha/kernel/sys_alcor.c
@@ -254,7 +254,7 @@ alcor_init_pci(void)
* motherboard, by looking for a 21040 TULIP in slot 6, which is
* built into XLT and BRET/MAVERICK, but not available on ALCOR.
*/
- dev = pci_find_device(PCI_VENDOR_ID_DEC,
+ dev = pci_get_device(PCI_VENDOR_ID_DEC,
PCI_DEVICE_ID_DEC_TULIP,
NULL);
if (dev && dev->devfn == PCI_DEVFN(6,0)) {
@@ -262,6 +262,7 @@ alcor_init_pci(void)
printk(KERN_INFO "%s: Detected AS500 or XLT motherboard.\n",
__FUNCTION__);
}
+ pci_dev_put(dev);
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/7] arch: pci_find_device remove (alpha/kernel/sys_sio.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
2005-08-29 22:24 ` [PATCH 1/7] arch: pci_find_device remove (alpha/kernel/sys_alcor.c) Jiri Slaby
@ 2005-08-29 22:25 ` Jiri Slaby
2005-08-29 22:25 ` [PATCH 3/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-frv.c) Jiri Slaby
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:25 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci, rth, ink
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
sys_sio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -105,7 +105,7 @@ sio_collect_irq_levels(void)
struct pci_dev *dev = NULL;
/* Iterate through the devices, collecting IRQ levels. */
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
(dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
continue;
@@ -229,8 +229,8 @@ alphabook1_init_pci(void)
*/
dev = NULL;
- while ((dev = pci_find_device(PCI_VENDOR_ID_NCR, PCI_ANY_ID, dev))) {
- if (dev->device == PCI_DEVICE_ID_NCR_53C810
+ while ((dev = pci_get_device(PCI_VENDOR_ID_NCR, PCI_ANY_ID, dev))) {
+ if (dev->device == PCI_DEVICE_ID_NCR_53C810
|| dev->device == PCI_DEVICE_ID_NCR_53C815
|| dev->device == PCI_DEVICE_ID_NCR_53C820
|| dev->device == PCI_DEVICE_ID_NCR_53C825) {
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-frv.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
2005-08-29 22:24 ` [PATCH 1/7] arch: pci_find_device remove (alpha/kernel/sys_alcor.c) Jiri Slaby
2005-08-29 22:25 ` [PATCH 2/7] arch: pci_find_device remove (alpha/kernel/sys_sio.c) Jiri Slaby
@ 2005-08-29 22:25 ` Jiri Slaby
2005-08-29 22:25 ` [PATCH 4/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-irq.c) Jiri Slaby
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:25 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci, dhowells
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
pci-frv.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -142,9 +142,7 @@ static void __init pcibios_allocate_reso
u16 command;
struct resource *r, *pr;
- while (dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev),
- dev != NULL
- ) {
+ for_each_pci_dev(dev) {
pci_read_config_word(dev, PCI_COMMAND, &command);
for(idx = 0; idx < 6; idx++) {
r = &dev->resource[idx];
@@ -188,9 +186,7 @@ static void __init pcibios_assign_resour
int idx;
struct resource *r;
- while (dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev),
- dev != NULL
- ) {
+ for_each_pci_dev(dev) {
int class = dev->class >> 8;
/* Don't touch classless devices and host bridges */
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-irq.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
` (2 preceding siblings ...)
2005-08-29 22:25 ` [PATCH 3/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-frv.c) Jiri Slaby
@ 2005-08-29 22:25 ` Jiri Slaby
2005-08-29 22:26 ` [PATCH 5/7] arch: pci_find_device remove (ppc/kernel/pci.c) Jiri Slaby
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:25 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci, dhowells
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
pci-irq.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -48,9 +48,7 @@ void __init pcibios_fixup_irqs(void)
struct pci_dev *dev = NULL;
uint8_t line, pin;
- while (dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev),
- dev != NULL
- ) {
+ for_each_pci_dev(dev) {
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin) {
dev->irq = pci_bus0_irq_routing[PCI_SLOT(dev->devfn)][pin - 1];
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5/7] arch: pci_find_device remove (ppc/kernel/pci.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
` (3 preceding siblings ...)
2005-08-29 22:25 ` [PATCH 4/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-irq.c) Jiri Slaby
@ 2005-08-29 22:26 ` Jiri Slaby
2005-08-29 22:26 ` [PATCH 6/7] arch: pci_find_device remove (ppc/platforms/85xx/mpc85xx_cds_common.c) Jiri Slaby
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:26 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci, paulus, linuxppc-dev
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
pci.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -517,7 +517,7 @@ pcibios_allocate_resources(int pass)
u16 command;
struct resource *r;
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
pci_read_config_word(dev, PCI_COMMAND, &command);
for (idx = 0; idx < 6; idx++) {
r = &dev->resource[idx];
@@ -554,7 +554,7 @@ pcibios_assign_resources(void)
int idx;
struct resource *r;
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
int class = dev->class >> 8;
/* Don't touch classless devices and host bridges */
@@ -880,14 +880,15 @@ pci_device_from_OF_node(struct device_no
*/
if (!pci_to_OF_bus_map)
return 0;
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
- if (pci_to_OF_bus_map[dev->bus->number] != *bus)
- continue;
- if (dev->devfn != *devfn)
- continue;
- *bus = dev->bus->number;
- return 0;
- }
+
+ for_each_pci_dev(dev)
+ if (pci_to_OF_bus_map[dev->bus->number] == *bus &&
+ dev->devfn == *devfn) {
+ *bus = dev->bus->number;
+ pci_dev_put(dev);
+ return 0;
+ }
+
return -ENODEV;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 6/7] arch: pci_find_device remove (ppc/platforms/85xx/mpc85xx_cds_common.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
` (4 preceding siblings ...)
2005-08-29 22:26 ` [PATCH 5/7] arch: pci_find_device remove (ppc/kernel/pci.c) Jiri Slaby
@ 2005-08-29 22:26 ` Jiri Slaby
2005-08-29 22:27 ` [PATCH 7/7] arch: pci_find_device remove (sparc64/kernel/ebus.c) Jiri Slaby
2005-09-01 19:28 ` [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:26 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, linux-pci, paulus, linuxppc-dev
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
mpc85xx_cds_common.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -354,10 +354,10 @@ mpc85xx_cds_fixup_via(struct pci_control
void __init
mpc85xx_cds_pcibios_fixup(void)
{
- struct pci_dev *dev = NULL;
+ struct pci_dev *dev;
u_char c;
- if ((dev = pci_find_device(PCI_VENDOR_ID_VIA,
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_82C586_1, NULL))) {
/*
* U-Boot does not set the enable bits
@@ -374,21 +374,24 @@ mpc85xx_cds_pcibios_fixup(void)
*/
dev->irq = 14;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+ pci_dev_put(dev);
}
/*
* Force legacy USB interrupt routing
*/
- if ((dev = pci_find_device(PCI_VENDOR_ID_VIA,
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_82C586_2, NULL))) {
dev->irq = 10;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
+ pci_dev_put(dev);
}
- if ((dev = pci_find_device(PCI_VENDOR_ID_VIA,
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_82C586_2, dev))) {
dev->irq = 11;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
+ pci_dev_put(dev);
}
}
#endif /* CONFIG_PCI */
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 7/7] arch: pci_find_device remove (sparc64/kernel/ebus.c)
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
` (5 preceding siblings ...)
2005-08-29 22:26 ` [PATCH 6/7] arch: pci_find_device remove (ppc/platforms/85xx/mpc85xx_cds_common.c) Jiri Slaby
@ 2005-08-29 22:27 ` Jiri Slaby
2005-09-01 19:28 ` [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
7 siblings, 0 replies; 10+ messages in thread
From: Jiri Slaby @ 2005-08-29 22:27 UTC (permalink / raw)
To: Greg KH
Cc: Linux Kernel Mailing List, linux-pci, davem, ecd, jj, anton,
sparclinux, ultralinux
Generated in 2.6.13-rc6-mm2 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
ebus.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -527,19 +527,13 @@ static struct pci_dev *find_next_ebus(st
{
struct pci_dev *pdev = start;
- do {
- pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
- if (pdev &&
- (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
- pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
+ while (pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev))
+ if (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
+ pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)
break;
- } while (pdev != NULL);
-
- if (pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
- *is_rio_p = 1;
- else
- *is_rio_p = 0;
+ *is_rio_p = !!(pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS));
+
return pdev;
}
@@ -637,6 +631,7 @@ void __init ebus_init(void)
ebus->is_rio = is_rio;
++num_ebus;
}
+ pci_dev_put(pdev); /* XXX for the case, when ebusnd is 0, is it OK? */
#ifdef CONFIG_SUN_AUXIO
auxio_probe();
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/7] arch: pci_find_device remove
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
` (6 preceding siblings ...)
2005-08-29 22:27 ` [PATCH 7/7] arch: pci_find_device remove (sparc64/kernel/ebus.c) Jiri Slaby
@ 2005-09-01 19:28 ` Jiri Slaby
2005-09-01 22:18 ` Greg KH
7 siblings, 1 reply; 10+ messages in thread
From: Jiri Slaby @ 2005-09-01 19:28 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Greg KH, Linux Kernel Mailing List, linux-pci
Jiri Slaby napsal(a):
>Set of patches, which removes pci_find_device from arch subtree.
>
> alpha/kernel/sys_alcor.c | 3 ++-
> alpha/kernel/sys_sio.c | 6 +++---
> frv/mb93090-mb00/pci-frv.c | 8 ++------
> frv/mb93090-mb00/pci-irq.c | 4 +---
> ppc/kernel/pci.c | 21 +++++++++++----------
> ppc/platforms/85xx/mpc85xx_cds_common.c | 11 +++++++----
> sparc64/kernel/ebus.c | 17 ++++++-----------
> 7 files changed, 32 insertions(+), 38 deletions(-)
>
>
Ok, nobody says nothing. So against what does Greg wants patches?
vanilla? some git? These are against andrew's tree and it seems, that
greg didn't accept them.
thanks,
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/7] arch: pci_find_device remove
2005-09-01 19:28 ` [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
@ 2005-09-01 22:18 ` Greg KH
0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2005-09-01 22:18 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Greg KH, Linux Kernel Mailing List, linux-pci
On Thu, Sep 01, 2005 at 09:28:10PM +0200, Jiri Slaby wrote:
> Jiri Slaby napsal(a):
>
> >Set of patches, which removes pci_find_device from arch subtree.
> >
> >alpha/kernel/sys_alcor.c | 3 ++-
> >alpha/kernel/sys_sio.c | 6 +++---
> >frv/mb93090-mb00/pci-frv.c | 8 ++------
> >frv/mb93090-mb00/pci-irq.c | 4 +---
> >ppc/kernel/pci.c | 21 +++++++++++----------
> >ppc/platforms/85xx/mpc85xx_cds_common.c | 11 +++++++----
> >sparc64/kernel/ebus.c | 17 ++++++-----------
> >7 files changed, 32 insertions(+), 38 deletions(-)
> >
> >
> Ok, nobody says nothing. So against what does Greg wants patches?
> vanilla? some git? These are against andrew's tree and it seems, that
> greg didn't accept them.
Greg was on vacation for a week and a half, and is now traveling across
the ocean for another week, so his response time is quite slow. But
they are in his TODO queue and will be attended to hopefully soon.
patience...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-09-01 22:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-29 22:20 [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
2005-08-29 22:24 ` [PATCH 1/7] arch: pci_find_device remove (alpha/kernel/sys_alcor.c) Jiri Slaby
2005-08-29 22:25 ` [PATCH 2/7] arch: pci_find_device remove (alpha/kernel/sys_sio.c) Jiri Slaby
2005-08-29 22:25 ` [PATCH 3/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-frv.c) Jiri Slaby
2005-08-29 22:25 ` [PATCH 4/7] arch: pci_find_device remove (frv/mb93090-mb00/pci-irq.c) Jiri Slaby
2005-08-29 22:26 ` [PATCH 5/7] arch: pci_find_device remove (ppc/kernel/pci.c) Jiri Slaby
2005-08-29 22:26 ` [PATCH 6/7] arch: pci_find_device remove (ppc/platforms/85xx/mpc85xx_cds_common.c) Jiri Slaby
2005-08-29 22:27 ` [PATCH 7/7] arch: pci_find_device remove (sparc64/kernel/ebus.c) Jiri Slaby
2005-09-01 19:28 ` [PATCH 0/7] arch: pci_find_device remove Jiri Slaby
2005-09-01 22:18 ` Greg KH
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).