* [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert
@ 2004-09-30 9:29 Tobias Klauser
2004-09-30 11:31 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tobias Klauser @ 2004-09-30 9:29 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
I'm sending this only to kernel-janitor since I'm not sure, if I do this
right (It's my first patch). It compiled without problems here.
Description: Use pci_get_device instead of pci_find_device.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
diff -Nrup linux-2.6.9-rc2-mm4-vanilla/drivers/atm/fore200e.c
linux-2.6.9-rc2-mm4/drivers/atm/fore200e.c
--- linux-2.6.9-rc2-mm4-vanilla/drivers/atm/fore200e.c 2004-09-30
10:24:43.000000000 +0200
+++ linux-2.6.9-rc2-mm4/drivers/atm/fore200e.c 2004-09-30
10:41:20.368794120 +0200
@@ -644,7 +644,7 @@ fore200e_pca_detect(const struct fore200
int count = index;
do {
- pci_dev = pci_find_device(PCI_VENDOR_ID_FORE,
PCI_DEVICE_ID_FORE_PCA200E, pci_dev);
+ pci_dev = pci_get_device(PCI_VENDOR_ID_FORE,
PCI_DEVICE_ID_FORE_PCA200E, pci_dev);
if (pci_dev == NULL)
return NULL;
} while (count--);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert
2004-09-30 9:29 [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert Tobias Klauser
@ 2004-09-30 11:31 ` Christoph Hellwig
2004-09-30 12:05 ` Matthew Wilcox
2004-09-30 17:11 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-09-30 11:31 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
On Thu, Sep 30, 2004 at 11:29:48AM +0200, Tobias Klauser wrote:
> I'm sending this only to kernel-janitor since I'm not sure, if I do this
> right (It's my first patch). It compiled without problems here.
>
> Description: Use pci_get_device instead of pci_find_device.
Sorry, but the original code really wants a rewrite to use pci_driver.
It's broken to no end, and pci_get_device won't fix the races.
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert
2004-09-30 9:29 [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert Tobias Klauser
2004-09-30 11:31 ` Christoph Hellwig
@ 2004-09-30 12:05 ` Matthew Wilcox
2004-09-30 17:11 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2004-09-30 12:05 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]
On Thu, Sep 30, 2004 at 11:29:48AM +0200, Tobias Klauser wrote:
> I'm sending this only to kernel-janitor since I'm not sure, if I do this
> right (It's my first patch). It compiled without problems here.
>
> Description: Use pci_get_device instead of pci_find_device.
You can't just replace pci_find_device() with pci_get_device(). Otherwise
it'd all be much simpler. You must understand what the code is doing, and
figure out what needs to be done to be hotplug safe. You need to read
Documentation/pci.txt and understand it.
> 10:24:43.000000000 +0200
> +++ linux-2.6.9-rc2-mm4/drivers/atm/fore200e.c 2004-09-30
> 10:41:20.368794120 +0200
> @@ -644,7 +644,7 @@ fore200e_pca_detect(const struct fore200
> int count = index;
>
> do {
> - pci_dev = pci_find_device(PCI_VENDOR_ID_FORE,
> PCI_DEVICE_ID_FORE_PCA200E, pci_dev);
> + pci_dev = pci_get_device(PCI_VENDOR_ID_FORE,
> PCI_DEVICE_ID_FORE_PCA200E, pci_dev);
> if (pci_dev == NULL)
> return NULL;
> } while (count--);
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> http://lists.osdl.org/mailman/listinfo/kernel-janitors
--
"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
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert
2004-09-30 9:29 [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert Tobias Klauser
2004-09-30 11:31 ` Christoph Hellwig
2004-09-30 12:05 ` Matthew Wilcox
@ 2004-09-30 17:11 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-09-30 17:11 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Thu, Sep 30, 2004 at 11:29:48AM +0200, Tobias Klauser wrote:
> I'm sending this only to kernel-janitor since I'm not sure, if I do this
> right (It's my first patch). It compiled without problems here.
>
> Description: Use pci_get_device instead of pci_find_device.
>
> Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
>
> diff -Nrup linux-2.6.9-rc2-mm4-vanilla/drivers/atm/fore200e.c
> linux-2.6.9-rc2-mm4/drivers/atm/fore200e.c
> --- linux-2.6.9-rc2-mm4-vanilla/drivers/atm/fore200e.c 2004-09-30
> 10:24:43.000000000 +0200
Becides the other errors mentioned in the patch, it is also linewrapped
and can't be applied :(
thanks,
greg k-h
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-09-30 17:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-30 9:29 [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 fore200e.c] convert Tobias Klauser
2004-09-30 11:31 ` Christoph Hellwig
2004-09-30 12:05 ` Matthew Wilcox
2004-09-30 17:11 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.