From: Greg KH <greg@kroah.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm] removes pci_find_device from i6300esb.c
Date: Tue, 9 Aug 2005 14:56:39 -0700 [thread overview]
Message-ID: <20050809215638.GC22683@kroah.com> (raw)
In-Reply-To: <42F87730.5030804@gmail.com>
On Tue, Aug 09, 2005 at 11:28:16AM +0200, Jiri Slaby wrote:
> Andrew Morton napsal(a):
>
> >Jiri Slaby <jirislaby@gmail.com> wrote:
> >
> >
> >>--- a/drivers/char/watchdog/i6300esb.c
> >>+++ b/drivers/char/watchdog/i6300esb.c
> >>@@ -368,12 +368,11 @@ static unsigned char __init esb_getdevic
> >> * Find the PCI device
> >> */
> >>
> >>- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) !=
> >>NULL) {
> >>+ for_each_pci_dev(dev)
> >> if (pci_match_id(esb_pci_tbl, dev)) {
> >> esb_pci = dev;
> >> break;
> >> }
> >>- }
> >>
> >> if (esb_pci) {
> >> if (pci_enable_device(esb_pci)) {
> >>@@ -430,6 +429,7 @@ err_release:
> >> pci_release_region(esb_pci, 0);
> >> err_disable:
> >> pci_disable_device(esb_pci);
> >>+ pci_dev_put(esb_pci);
> >>
> >>
> >
> >That doesn't look right. Each iteration of for_each_pci_dev() needs a
> >pci_dev_put(), not just the final one.
Not true, see the documentation for pci_get_device(), it's only required
if you break out of the loop.
thanks,
greg k-h
next prev parent reply other threads:[~2005-08-09 21:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-08 10:34 [PATCH -mm] i6300esb.c uses pci_find_device Jiri Slaby
2005-08-08 23:55 ` [PATCH -mm] removes pci_find_device from i6300esb.c Jiri Slaby
2005-08-09 5:59 ` Greg KH
2005-08-09 16:06 ` Jiri Slaby
2005-08-09 23:37 ` Greg KH
2005-08-10 0:09 ` [PATCH 0/2] pci_find_device patches Jiri Slaby
2005-08-10 0:09 ` [PATCH -mm 1/2] removes pci_find_device from i6300esb.c Jiri Slaby
2005-08-16 0:24 ` [PATCH] " Jiri Slaby
2005-08-16 0:28 ` Greg KH
2005-08-10 0:09 ` [PATCH 2/2] removes pci_find_device from parport_pc.c Jiri Slaby
2005-08-09 6:34 ` [PATCH -mm] removes pci_find_device from i6300esb.c Andrew Morton
2005-08-09 9:28 ` Jiri Slaby
2005-08-09 21:56 ` Greg KH [this message]
2005-08-09 9:53 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050809215638.GC22683@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.