All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: [PATCH -mm] removes pci_find_device from i6300esb.c
Date: Tue, 09 Aug 2005 11:28:16 +0200	[thread overview]
Message-ID: <42F87730.5030804@gmail.com> (raw)
In-Reply-To: <20050808233429.36e6ebd5.akpm@osdl.org>

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.
>  
>
But pci_get_device do it for us on pci_get_subsys, line 249, doesn't it?

-- 
Jiri Slaby         www.fi.muni.cz/~xslaby
~\-/~      jirislaby@gmail.com      ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10


  reply	other threads:[~2005-08-09  9:28 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 [this message]
2005-08-09 21:56       ` Greg KH
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=42F87730.5030804@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.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.