From: Andrew Morton <akpm@linux-foundation.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org, nix.or.die@googlemail.com
Subject: Re: [patch 12/30] Fix drivers/scsi/fdomain.c CONFIG_PCI=n warnings
Date: Wed, 15 Aug 2007 10:39:16 -0700 [thread overview]
Message-ID: <20070815103916.8e4367d2.akpm@linux-foundation.org> (raw)
In-Reply-To: <1187195749.3327.27.camel@localhost.localdomain>
On Wed, 15 Aug 2007 11:35:49 -0500 James Bottomley <James.Bottomley@SteelEye.com> wrote:
> On Fri, 2007-08-10 at 14:50 -0700, akpm@linux-foundation.org wrote:
> > From: Gabriel C <nix.or.die@googlemail.com>
> >
> > I get this warnings on current git when CONFIG_PCI is not set :
> >
> > drivers/scsi/fdomain.c:390: warning: 'PCI_dev' defined but not used
> > drivers/scsi/fdomain.c:1768: warning: 'fdomain_pci_tbl' defined but not used
> >
> > Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> This function looks decidedly dangerous since it references a
> non-existent variable when CONFIG_PCI isn't set. It seems to work
> because pci_dev_put() is defined to a null macro, but it's not safe:
>
> static int fdomain_16x0_release(struct Scsi_Host *shpnt)
> {
> if (shpnt->irq)
> free_irq(shpnt->irq, shpnt);
> if (shpnt->io_port && shpnt->n_io_port)
> release_region(shpnt->io_port, shpnt->n_io_port);
> if (PCI_bus)
> pci_dev_put(PCI_dev);
> return 0;
> }
>
I expect that's why pci_dev_put() is still implemented as a macro.
next prev parent reply other threads:[~2007-08-15 17:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 21:50 [patch 12/30] Fix drivers/scsi/fdomain.c CONFIG_PCI=n warnings akpm
2007-08-15 16:35 ` James Bottomley
2007-08-15 17:39 ` Andrew Morton [this message]
2007-08-15 17:46 ` James Bottomley
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=20070815103916.8e4367d2.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nix.or.die@googlemail.com \
/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