2004-10-08 22:57:16

by Hanna Linder

[permalink] [raw]
Subject: [RFT 2.6] pci-gart.c replace pci_find_device with pci_get_device

As pci_find_device is going away I've replaced it with pci_get_device.
If someone with a x86-64 system could test it I would appreciate it.
Thanks.

This should be the last of the /arch fixes for this work.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <[email protected]>
---
diff -Nrup linux-2.6.9-rc3-mm3cln/arch/x86_64/kernel/pci-gart.c linux-2.6.9-rc3-mm3patch3/arch/x86_64/kernel/pci-gart.c
--- linux-2.6.9-rc3-mm3cln/arch/x86_64/kernel/pci-gart.c 2004-09-29 20:04:32.000000000 -0700
+++ linux-2.6.9-rc3-mm3patch3/arch/x86_64/kernel/pci-gart.c 2004-10-08 15:42:18.000000000 -0700
@@ -81,7 +81,7 @@ static u32 gart_unmapped_entry;

#define for_all_nb(dev) \
dev = NULL; \
- while ((dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
+ while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
if (dev->bus->number == 0 && \
(PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31))




2004-10-09 17:15:46

by Scott Feldman

[permalink] [raw]
Subject: Re: [KJ] [RFT 2.6] pci-gart.c replace pci_find_device with pci_get_device

On Fri, 2004-10-08 at 15:55, Hanna Linder wrote:
> @@ -81,7 +81,7 @@ static u32 gart_unmapped_entry;
>
> #define for_all_nb(dev) \
> dev = NULL; \
> - while ((dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
> + while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
> if (dev->bus->number == 0 && \
> (PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31))

for_each_pci_dev?

-scott

2004-10-09 18:19:11

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [KJ] [RFT 2.6] pci-gart.c replace pci_find_device with pci_get_device

On Sat, Oct 09, 2004 at 10:15:34AM -0700, Scott Feldman wrote:
> On Fri, 2004-10-08 at 15:55, Hanna Linder wrote:
> > @@ -81,7 +81,7 @@ static u32 gart_unmapped_entry;
> >
> > #define for_all_nb(dev) \
> > dev = NULL; \
> > - while ((dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
> > + while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\
> > if (dev->bus->number == 0 && \
> > (PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31))
>
> for_each_pci_dev?

for_each_pci_dev() doesn't take a VENDOR/DEVICE ID pair.
I think this is a mistake.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain

2004-10-09 21:35:59

by Scott Feldman

[permalink] [raw]
Subject: Re: [KJ] [RFT 2.6] pci-gart.c replace pci_find_device with pci_get_device

On Sat, 2004-10-09 at 11:18, Matthew Wilcox wrote:
> > for_each_pci_dev?
>
> for_each_pci_dev() doesn't take a VENDOR/DEVICE ID pair.
> I think this is a mistake.

You're right, my bad.

-scott