From: Maarten Bressers <mbres@gentoo.org>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix compiler warnings for 2.6.23-rc8 on x86_64
Date: Sat, 29 Sep 2007 00:04:47 +0000 (UTC) [thread overview]
Message-ID: <20070929000447.ACC7A65737@smtp.gentoo.org> (raw)
On Fri, 28 Sep 2007 15:49:26 -0700
Greg KH <greg@kroah.com> wrote:
> On Fri, Sep 28, 2007 at 08:56:30PM +0000, Maarten Bressers wrote:
> > This (trivial) patch fixes two compiler warnings for 2.6.23-rc8 on x86_64,
> > use of deprecated function pci_find_device() and a section mismatch.
> > Build log and .config file included.
> >
> > Signed-off by: Maarten Bressers <mbres@gentoo.org>
> >
> >
> > diff --git a/drivers/pci/search.c b/drivers/pci/search.c
> > index c6e79d0..0eb7e9e 100644
> > --- a/drivers/pci/search.c
> > +++ b/drivers/pci/search.c
> > @@ -96,7 +96,7 @@ pci_find_slot(unsigned int bus, unsigned int devfn)
> > {
> > struct pci_dev *dev = NULL;
> >
> > - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
> > + while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
> > if (dev->bus->number == bus && dev->devfn == devfn)
> > return dev;
> > }
>
> This is not a trivial patch, it changes the behavior of the code and is
> buggy.
>
> Please read the documentationfor pci_get_device() on how to use it
> properly. It can not be used in pci_find_slot() as the reference
> counting will be all wrong. You need to just work to get rid of
> pci_find_slot() and then remove the whole function to get rid of the
> warning :)
>
> > -EXPORT_SYMBOL(pci_find_device);
> > -EXPORT_SYMBOL(pci_find_slot);
>
> What about the modules that want to use these functions? Are they all
> now gone? If so, just drop the whole function.
>
> thanks,
>
> greg k-h
Greg, thank you for your reply. It seems I'm out of my league here, I
just thought I could quickly fix two compiler warnings, obviously this
is not the case. I've read the documentation, but I don't think I'll be
able to fix this. Sorry for the noise.
Randy, please ignore the other patch I sent you, it's obviously wrong.
next reply other threads:[~2007-09-29 0:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-29 0:04 Maarten Bressers [this message]
2007-09-29 2:43 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2007-09-28 23:02 Maarten Bressers
2007-09-28 20:56 Maarten Bressers
2007-09-28 21:48 ` Randy Dunlap
2007-09-28 22:49 ` Greg KH
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=20070929000447.ACC7A65737@smtp.gentoo.org \
--to=mbres@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®