From: Andrew Morton <akpm@linux-foundation.org>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Michael H. Warfield" <mhw@wittsend.com>
Subject: Re: [PATCH] ip2: Remove #ifdef MODULE from ip2main.c
Date: Thu, 3 Dec 2009 20:14:33 -0800 [thread overview]
Message-ID: <20091203201433.bea0f893.akpm@linux-foundation.org> (raw)
In-Reply-To: <b9df5fa10912010102p405b429dg102843fe88932b9d@mail.gmail.com>
On Tue, 1 Dec 2009 15:02:56 +0600 Rakib Mullick <rakib.mullick@gmail.com> wrote:
> >From kernel command line we can pass "module parameters".
> So #ifdef MODULE is obsolute now. Remove it completely.
> When CONFIG_PCI=n and building ip2main.c then we are hit
> by the following warning. So move *pdev into #ifdef CONFIG_PCI.
>
> drivers/char/ip2/ip2main.c: In function `ip2_loadmain':
> drivers/char/ip2/ip2main.c:542: warning: unused variable `pdev'
x86_64 allmodconfig:
drivers/char/ip2/ip2main.c: In function 'ip2_loadmain':
drivers/char/ip2/ip2main.c:657: error: 'pdev' undeclared (first use in this function)
drivers/char/ip2/ip2main.c:657: error: (Each undeclared identifier is reported only once
drivers/char/ip2/ip2main.c:657: error: for each function it appears in.)
I suppose this:
--- a/drivers/char/ip2/ip2main.c~ip2-remove-ifdef-module-from-ip2mainc-fix
+++ a/drivers/char/ip2/ip2main.c
@@ -636,6 +636,7 @@ static int __init ip2_loadmain(void)
dev_err(&pdev->dev, "I/O address error\n");
ip2config.irq[i] = pdev->irq;
+ pci_dev_put(pdev);
}
#else
printk(KERN_ERR "IP2: PCI card specified but PCI "
@@ -654,7 +655,6 @@ static int __init ip2_loadmain(void)
break;
} /* switch */
} /* for */
- pci_dev_put(pdev);
for (i = 0; i < IP2_MAX_BOARDS; ++i) {
if (ip2config.addr[i]) {
_
but it needs checking - does pci_get_device() need a balancing pci_dev_put()?
next prev parent reply other threads:[~2009-12-04 4:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 9:02 [PATCH] ip2: Remove #ifdef MODULE from ip2main.c Rakib Mullick
2009-12-01 15:00 ` Michael H. Warfield
2009-12-04 4:14 ` Andrew Morton [this message]
2009-12-04 9:37 ` Rakib Mullick
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=20091203201433.bea0f893.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhw@wittsend.com \
--cc=rakib.mullick@gmail.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