* [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
@ 2010-11-02 15:04 Atul Sowani
2010-11-02 15:18 ` Greg KH
2010-11-02 15:21 ` Arnaud Patard
0 siblings, 2 replies; 6+ messages in thread
From: Atul Sowani @ 2010-11-02 15:04 UTC (permalink / raw)
To: arnaud.patard; +Cc: linux-kernel, gregkh
Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
recommended in pci.txt filei in PCI Documentation.
Signed-off-by: Atul Sowani <sowani@gmail.com>
---
diff -uprN a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
--- a/drivers/staging/xgifb/XGI_main_26.c 2010-10-21 02:00:22.000000000 +0530
+++ b/drivers/staging/xgifb/XGI_main_26.c 2010-11-01 14:25:21.032436943 +0530
@@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_
break;
}
- pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
+ pdev = pci_get_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
if (pdev)
valid_pdev = 1;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
2010-11-02 15:04 [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device() Atul Sowani
@ 2010-11-02 15:18 ` Greg KH
2010-11-02 15:21 ` Arnaud Patard
1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-11-02 15:18 UTC (permalink / raw)
To: Atul Sowani; +Cc: arnaud.patard, linux-kernel
On Tue, Nov 02, 2010 at 08:34:00PM +0530, Atul Sowani wrote:
> Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
> recommended in pci.txt filei in PCI Documentation.
Yes, but you just caused a resource leak :(
>
> Signed-off-by: Atul Sowani <sowani@gmail.com>
> ---
> diff -uprN a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
> --- a/drivers/staging/xgifb/XGI_main_26.c 2010-10-21 02:00:22.000000000 +0530
> +++ b/drivers/staging/xgifb/XGI_main_26.c 2010-11-01 14:25:21.032436943 +0530
> @@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_
> break;
> }
>
> - pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
> + pdev = pci_get_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
Please read the documentation for pci_get_device() for the fact that you
now have a reference to the pci device. You need to properly drop it
when finished.
Please change this patch to do that properly and I will be glad to apply
it.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
2010-11-02 15:04 [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device() Atul Sowani
2010-11-02 15:18 ` Greg KH
@ 2010-11-02 15:21 ` Arnaud Patard
2010-11-02 15:27 ` Greg KH
1 sibling, 1 reply; 6+ messages in thread
From: Arnaud Patard @ 2010-11-02 15:21 UTC (permalink / raw)
To: sowani; +Cc: linux-kernel, gregkh
Atul Sowani <sowani@gmail.com> writes:
Hi,
> Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
> recommended in pci.txt filei in PCI Documentation.
>
> Signed-off-by: Atul Sowani <sowani@gmail.com>
> ---
> diff -uprN a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
> --- a/drivers/staging/xgifb/XGI_main_26.c 2010-10-21 02:00:22.000000000 +0530
> +++ b/drivers/staging/xgifb/XGI_main_26.c 2010-11-01 14:25:21.032436943 +0530
> @@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_
> break;
> }
>
> - pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
> + pdev = pci_get_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
> if (pdev)
> valid_pdev = 1;
hmm... I guess that a pci_dev_put() call is lacking if it has been found.
Arnaud
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
2010-11-02 15:21 ` Arnaud Patard
@ 2010-11-02 15:27 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-11-02 15:27 UTC (permalink / raw)
To: Arnaud Patard; +Cc: sowani, linux-kernel
On Tue, Nov 02, 2010 at 04:21:36PM +0100, Arnaud Patard wrote:
> Atul Sowani <sowani@gmail.com> writes:
> Hi,
>
> > Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
> > recommended in pci.txt filei in PCI Documentation.
> >
> > Signed-off-by: Atul Sowani <sowani@gmail.com>
> > ---
> > diff -uprN a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
> > --- a/drivers/staging/xgifb/XGI_main_26.c 2010-10-21 02:00:22.000000000 +0530
> > +++ b/drivers/staging/xgifb/XGI_main_26.c 2010-11-01 14:25:21.032436943 +0530
> > @@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_
> > break;
> > }
> >
> > - pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
> > + pdev = pci_get_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
> > if (pdev)
> > valid_pdev = 1;
>
> hmm... I guess that a pci_dev_put() call is lacking if it has been found.
Exactly, that is what is needed here.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
@ 2010-11-03 13:10 Atul Sowani
2010-11-03 13:18 ` Arnaud Patard
0 siblings, 1 reply; 6+ messages in thread
From: Atul Sowani @ 2010-11-03 13:10 UTC (permalink / raw)
To: arnaud.patard; +Cc: linux-kernel, gregkh
Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
recommended in pci.txt filei in PCI Documentation.
Signed-off-by: Atul Sowani <sowani@gmail.com>
---
--- a/drivers/staging/xgifb/XGI_main_26.c 2010-10-21 02:00:22.000000000 +0530
+++ b/drivers/staging/xgifb/XGI_main_26.c 2010-11-03 18:35:18.000000000 +0530
@@ -483,9 +483,11 @@ XGIfb_query_VGA_config_space(struct xgi_
break;
}
- pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
- if (pdev)
+ pdev = pci_get_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
+ if (pdev) {
valid_pdev = 1;
+ pci_dev_put(pdev);
+ }
}
if (!valid_pdev) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
2010-11-03 13:10 Atul Sowani
@ 2010-11-03 13:18 ` Arnaud Patard
0 siblings, 0 replies; 6+ messages in thread
From: Arnaud Patard @ 2010-11-03 13:18 UTC (permalink / raw)
To: sowani; +Cc: linux-kernel, gregkh
Atul Sowani <sowani@gmail.com> writes:
> Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
> recommended in pci.txt filei in PCI Documentation.
>
> Signed-off-by: Atul Sowani <sowani@gmail.com>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-11-03 13:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 15:04 [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device() Atul Sowani
2010-11-02 15:18 ` Greg KH
2010-11-02 15:21 ` Arnaud Patard
2010-11-02 15:27 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2010-11-03 13:10 Atul Sowani
2010-11-03 13:18 ` Arnaud Patard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox