From: Matthew Wilcox <matthew@wil.cx>
To: kernel-janitors@vger.kernel.org
Subject: Re: warning: ???pci_find_device??? is deprecated
Date: Fri, 02 May 2008 16:25:39 +0000 [thread overview]
Message-ID: <20080502162539.GG14976@parisc-linux.org> (raw)
On Fri, May 02, 2008 at 05:19:40PM +0100, Ricardo Martins wrote:
> There are 14 drivers in drivers/isdn/hisax/ still using calls to
> pci_find_device() instead of the pci_get_device(). From what I gather, a
> simple sed 's|pci_find_device|pci_get_device|' is enough to fix this,
> since both functions use the same input and give the same output.
> Is this correct?
It's never correct. If it were that easy (a) there wouldn't be a rename
in the first place and (b) it would have been done with a shell-script
already.
pci_get_device increments a refcount on the pci_dev. pci_find_device
does not. Your patch must include calls to pci_dev_put() *when
appropriate*. Note, for example, that pci_get_device decrements the
refcount on the device passed in.
> Also, since there are 14 drivers with only those 1-line changes, should each
> driver have its own patch or could I send a single patch covering all of
> them?
It's not going to be a 1-line patch, so one per driver.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next reply other threads:[~2008-05-02 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 16:25 Matthew Wilcox [this message]
2008-05-02 16:28 ` warning: ???pci_find_device??? is deprecated Julia Lawall
2008-05-02 16:42 ` Ricardo Martins
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=20080502162539.GG14976@parisc-linux.org \
--to=matthew@wil.cx \
--cc=kernel-janitors@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.