public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/3] Replace pci_find_device with pci_get_device
@ 2005-01-10 19:46 domen
  2005-01-10 21:09 ` Jesse Barnes
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: domen @ 2005-01-10 19:46 UTC (permalink / raw)
  To: linux-ia64




As pci_find_device is going away soon I have replaced the call with pci_get_device.
Judith, could you run these 3 ia64 ones through PLM, please? 

Thanks a lot.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <hannal@us.ibm.com>
Acked-by: Judith Lebzelter <judith@osdl.org>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>

---

Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/arch/ia64/pci/pci.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/ia64/pci/pci.c~pci_dev_present-arch_ia64_pci_pci arch/ia64/pci/pci.c
--- kj/arch/ia64/pci/pci.c~pci_dev_present-arch_ia64_pci_pci	2005-01-10 18:00:15.000000000 +0100
+++ kj-domen/arch/ia64/pci/pci.c	2005-01-10 18:00:15.000000000 +0100
@@ -154,7 +154,7 @@ extern acpi_status acpi_map_iosapic (acp
 		printk(KERN_INFO "** was specified.  If this was required to make a driver work,\n");
 		printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n");
 		printk(KERN_INFO "** so I can fix the driver.\n");
-		while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+		while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
 			acpi_pci_irq_enable(dev);
 	} else {
 		printk(KERN_INFO "** PCI interrupts are no longer routed automatically.  If this\n");
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2/3] Replace pci_find_device with pci_get_device
  2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
@ 2005-01-10 21:09 ` Jesse Barnes
  2005-01-10 21:18 ` Hanna Linder
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jesse Barnes @ 2005-01-10 21:09 UTC (permalink / raw)
  To: linux-ia64

On Monday, January 10, 2005 11:46 am, domen@coderock.org wrote:
> -  while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
> +  while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>     acpi_pci_irq_enable(dev);

Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead?  
Bjorn?

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2/3] Replace pci_find_device with pci_get_device
  2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
  2005-01-10 21:09 ` Jesse Barnes
@ 2005-01-10 21:18 ` Hanna Linder
  2005-01-10 21:21 ` Bjorn Helgaas
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Hanna Linder @ 2005-01-10 21:18 UTC (permalink / raw)
  To: linux-ia64

--On Monday, January 10, 2005 01:09:30 PM -0800 Jesse Barnes <jbarnes@engr.sgi.com> wrote:

> On Monday, January 10, 2005 11:46 am, domen@coderock.org wrote:
>> -  while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>> +  while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>>     acpi_pci_irq_enable(dev);
> 
> Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead?  
> Bjorn?
> 
> Thanks,
> Jesse

Looks to me like it should be as well. I must have missed it when I went through
and did for_each_pci_dev. I can try to make a new patch but it might take a day
or two.

Hanna


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2/3] Replace pci_find_device with pci_get_device
  2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
  2005-01-10 21:09 ` Jesse Barnes
  2005-01-10 21:18 ` Hanna Linder
@ 2005-01-10 21:21 ` Bjorn Helgaas
  2005-01-10 21:37 ` Hanna Linder
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2005-01-10 21:21 UTC (permalink / raw)
  To: linux-ia64

On Mon, 2005-01-10 at 13:09 -0800, Jesse Barnes wrote:
> On Monday, January 10, 2005 11:46 am, domen@coderock.org wrote:
> > -  while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
> > +  while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
> >     acpi_pci_irq_enable(dev);
> 
> Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead?  
> Bjorn?

They're equivalent, right?  Looks OK to me either way.  I guess
if you switch to for_each_pci_dev(), you could switch the one
in sba_iommu.c, too.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2/3] Replace pci_find_device with pci_get_device
  2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
                   ` (2 preceding siblings ...)
  2005-01-10 21:21 ` Bjorn Helgaas
@ 2005-01-10 21:37 ` Hanna Linder
  2005-01-11  0:22 ` [patch 2/3] Replace pci_find_device with pci_get_device - pci.c Hanna Linder
  2005-01-11  0:23 ` [patch 2/3] Replace pci_find_device with pci_get_device - sba_iommu.c Hanna Linder
  5 siblings, 0 replies; 7+ messages in thread
From: Hanna Linder @ 2005-01-10 21:37 UTC (permalink / raw)
  To: linux-ia64

--On Monday, January 10, 2005 02:21:56 PM -0700 Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:

>> Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead?  
>> Bjorn?
> 
> They're equivalent, right?  Looks OK to me either way.  I guess
> if you switch to for_each_pci_dev(), you could switch the one
> in sba_iommu.c, too.

Yes they are equivalent. Will do.

Hanna




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2/3] Replace pci_find_device with pci_get_device - pci.c
  2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
                   ` (3 preceding siblings ...)
  2005-01-10 21:37 ` Hanna Linder
@ 2005-01-11  0:22 ` Hanna Linder
  2005-01-11  0:23 ` [patch 2/3] Replace pci_find_device with pci_get_device - sba_iommu.c Hanna Linder
  5 siblings, 0 replies; 7+ messages in thread
From: Hanna Linder @ 2005-01-11  0:22 UTC (permalink / raw)
  To: linux-ia64

--On Monday, January 10, 2005 02:21:56 PM -0700 Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:

> On Mon, 2005-01-10 at 13:09 -0800, Jesse Barnes wrote:
>> On Monday, January 10, 2005 11:46 am, domen@coderock.org wrote:
>> > -  while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>> > +  while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>> >     acpi_pci_irq_enable(dev);
>> 
>> Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead?  
>> Bjorn?
> 
> They're equivalent, right?  Looks OK to me either way.  I guess
> if you switch to for_each_pci_dev(), you could switch the one
> in sba_iommu.c, too.


Ok. Here is the reroll of the original patch to us for_each_pci_dev:

Signed-off-by: Hanna Linder <hannal@us.ibm.com>

diff -Nrup linux-2.6.10cln/arch/ia64/pci/pci.c linux-2.6.10p/arch/ia64/pci/pci.c
--- linux-2.6.10cln/arch/ia64/pci/pci.c	2005-01-10 15:45:16.000000000 -0800
+++ linux-2.6.10p/arch/ia64/pci/pci.c	2005-01-10 15:54:35.564251536 -0800
@@ -154,7 +154,7 @@ extern acpi_status acpi_map_iosapic (acp
 		printk(KERN_INFO "** was specified.  If this was required to make a driver work,\n");
 		printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n");
 		printk(KERN_INFO "** so I can fix the driver.\n");
-		while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+		for_each_pci_dev(dev)
 			acpi_pci_irq_enable(dev);
 	} else {
 		printk(KERN_INFO "** PCI interrupts are no longer routed automatically.  If this\n");




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 2/3] Replace pci_find_device with pci_get_device - sba_iommu.c
  2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
                   ` (4 preceding siblings ...)
  2005-01-11  0:22 ` [patch 2/3] Replace pci_find_device with pci_get_device - pci.c Hanna Linder
@ 2005-01-11  0:23 ` Hanna Linder
  5 siblings, 0 replies; 7+ messages in thread
From: Hanna Linder @ 2005-01-11  0:23 UTC (permalink / raw)
  To: linux-ia64

--On Monday, January 10, 2005 02:21:56 PM -0700 Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:

> On Mon, 2005-01-10 at 13:09 -0800, Jesse Barnes wrote:
>> On Monday, January 10, 2005 11:46 am, domen@coderock.org wrote:
>> > -  while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>> > +  while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
>> >     acpi_pci_irq_enable(dev);
>> 
>> Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead?  
>> Bjorn?
> 
> They're equivalent, right?  Looks OK to me either way.  I guess
> if you switch to for_each_pci_dev(), you could switch the one
> in sba_iommu.c, too.

Here is the reroll of the sba_iommu.c patch to use for_each_pci_dev.

Signed-off-by: Hanna Linder <hannal@us.ibm.com>

diff -Nrup linux-2.6.10cln/arch/ia64/hp/common/sba_iommu.c linux-2.6.10p2/arch/ia64/hp/common/sba_iommu.c
--- linux-2.6.10cln/arch/ia64/hp/common/sba_iommu.c	2005-01-10 15:45:15.000000000 -0800
+++ linux-2.6.10p2/arch/ia64/hp/common/sba_iommu.c	2005-01-10 15:51:33.602913864 -0800
@@ -1557,7 +1557,7 @@ ioc_iova_init(struct ioc *ioc)
 	** We program the next pdir index after we stop w/ a key for
 	** the GART code to handshake on.
 	*/
-	while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL)
+	for_each_pci_dev(device)	
 		agp_found |= pci_find_capability(device, PCI_CAP_ID_AGP);
 
 	if (agp_found && reserve_sba_gart) {


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-01-11  0:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 19:46 [patch 2/3] Replace pci_find_device with pci_get_device domen
2005-01-10 21:09 ` Jesse Barnes
2005-01-10 21:18 ` Hanna Linder
2005-01-10 21:21 ` Bjorn Helgaas
2005-01-10 21:37 ` Hanna Linder
2005-01-11  0:22 ` [patch 2/3] Replace pci_find_device with pci_get_device - pci.c Hanna Linder
2005-01-11  0:23 ` [patch 2/3] Replace pci_find_device with pci_get_device - sba_iommu.c Hanna Linder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox