From: Adrian Bunk <bunk@stusta.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, James.Bottomley@SteelEye.com,
linux-scsi@vger.kernel.org
Subject: Re: [2.6 patch] drivers/scsi/dpt_i2o.c: remove dead code
Date: Wed, 11 Oct 2006 16:52:22 +0200 [thread overview]
Message-ID: <20061011145222.GL721@stusta.de> (raw)
In-Reply-To: <1160578300.16513.15.camel@localhost.localdomain>
On Wed, Oct 11, 2006 at 03:51:40PM +0100, Alan Cox wrote:
> Ar Llu, 2006-10-09 am 01:16 +0200, ysgrifennodd Adrian Bunk:
> > The Coverity checker spotted this dead code introduced by
> > commit a07f353701acae77e023f6270e8af353b37af7c4.
> >
> > Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> Semi-NAK
>
> Its not dead jim, its in the wrong location
>
> > while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) {
> > if(pDev->device == PCI_DPT_DEVICE_ID ||
> > pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){
> > if(adpt_install_hba(sht, pDev) ){
> > PERROR("Could not Init an I2O RAID device\n");
> > PERROR("Will not try to detect others.\n");
>
> ------------------------> pci_dev_put()
>
> is needed there instead I think.
>...
The current code is:
/* search for all Adatpec I2O RAID cards */
while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) {
if(pDev->device == PCI_DPT_DEVICE_ID ||
pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){
if(adpt_install_hba(sht, pDev) ){
PERROR("Could not Init an I2O RAID device\n");
PERROR("Will not try to detect others.\n");
return hba_count-1;
}
pci_dev_get(pDev);
}
}
if (pDev)
pci_dev_put(pDev);
I don't see the point of the suggested place for the pci_dev_put()
since pci_dev_get() has never been executed in this case, or do I miss
anything?
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2006-10-11 14:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-08 23:16 [2.6 patch] drivers/scsi/dpt_i2o.c: remove dead code Adrian Bunk
2006-10-11 14:51 ` Alan Cox
2006-10-11 14:52 ` Adrian Bunk [this message]
2006-10-11 17:45 ` Alan Cox
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=20061011145222.GL721@stusta.de \
--to=bunk@stusta.de \
--cc=James.Bottomley@SteelEye.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox