login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
12
Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Boaz Harrosh <bharrosh@...>
To: James Bottomley <James.Bottomley@...>
Cc: Sergio Luis <sergio@...>, Achim Leubner <achim_leubner@...>, <linux-scsi@...>, LKML <linux-kernel@...>
Subject:
Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device
Date: Tuesday, February 12, 2008 - 12:54 pm
On Tue, Feb 12 2008 at 18:22 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
quoted text
> On Tue, 2008-02-12 at 11:31 -0300, Sergio Luis wrote: >> Fix compilation warning in drivers/scsi/gdth.c, using deprecated pci_find_device. >> Change it into using pci_get_device instead: >> drivers/scsi/gdth.c:645: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:495) >> >> Signed-off-by: Sergio Luis <sergio@larces.uece.br> >> >> gdth.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> >> diff -urN linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c linux-2.6.25-rc1-git2/drivers/scsi/gdth.c >> --- linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c 2008-02-12 09:26:14.000000000 -0300 >> +++ linux-2.6.25-rc1-git2/drivers/scsi/gdth.c 2008-02-12 10:33:08.000000000 -0300 >> @@ -642,7 +642,7 @@ >> *cnt, vendor, device)); >> >> pdev = NULL; >> - while ((pdev = pci_find_device(vendor, device, pdev)) >> + while ((pdev = pci_get_device(vendor, device, pdev)) >> != NULL) { >> if (pci_enable_device(pdev)) >> continue; > > This can't be correct without a matching put in the error leg. > > The difference between the two APIs is that pci_get_device returns a > pci_device with a reference taken and pci_find_device doesn't. However, > pci_get_device does drop the reference again so as long as you never > exit the loop until it returns NULL, it is OK ... it's the exits before > pci_get_device() returns NULL that need the put. > > James >
Yes you are right I have just realized that. Reinspecting pci_get_device() Sergio will you do it? or should I have a try? Boaz --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth....
, Sergio Luis
, (Tue Feb 12, 10:31 am)
Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/g...
, James Bottomley
, (Tue Feb 12, 12:22 pm)
Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/g...
, Boaz Harrosh
, (Tue Feb 12, 12:54 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Jeff Garzik
Re: fallocate-implementation-on-i86-x86_64-and-powerpc.patch
git
:
linux-netdev
:
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Arjan van de Ven
Re: [GIT]: Networking
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
Natalie Protasevich
[BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
625 guests
online.
Online users
olecom
Syndicate