From: Andrew Morton <akpm@linux-foundation.org>
To: Namhyung Kim <namhyung@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] telephony/ixj: fix compiler warning on ixj_pci_tbl
Date: Tue, 7 Dec 2010 13:16:00 -0800 [thread overview]
Message-ID: <20101207131600.b769e3df.akpm@linux-foundation.org> (raw)
In-Reply-To: <1291736993-15278-1-git-send-email-namhyung@gmail.com>
On Wed, 8 Dec 2010 00:49:53 +0900
Namhyung Kim <namhyung@gmail.com> wrote:
> Annotate ixj_pci_tbl as '__used' to fix following warning:
>
> CC drivers/telephony/ixj.o
> drivers/telephony/ixj.c:287: warning: ___ixj_pci_tbl___ defined but not used
>
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
> drivers/telephony/ixj.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
> index 0d236f4..de92133 100644
> --- a/drivers/telephony/ixj.c
> +++ b/drivers/telephony/ixj.c
> @@ -284,7 +284,7 @@ static int samplerate = 100;
>
> module_param(ixjdebug, int, 0);
>
> -static struct pci_device_id ixj_pci_tbl[] __devinitdata = {
> +static struct pci_device_id ixj_pci_tbl[] __devinitdata __used = {
> { PCI_VENDOR_ID_QUICKNET, PCI_DEVICE_ID_QUICKNET_XJ,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
> { }
This way, I believe:
--- a/drivers/telephony/ixj.c~a
+++ a/drivers/telephony/ixj.c
@@ -284,12 +284,11 @@ static int samplerate = 100;
module_param(ixjdebug, int, 0);
-static struct pci_device_id ixj_pci_tbl[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(ixj_pci_tbl) = {
{ PCI_VENDOR_ID_QUICKNET, PCI_DEVICE_ID_QUICKNET_XJ,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ }
};
-
MODULE_DEVICE_TABLE(pci, ixj_pci_tbl);
/************************************************************************
It fixes the warning, but I'm not sure how it did that.
prev parent reply other threads:[~2010-12-07 21:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 15:49 [PATCH] telephony/ixj: fix compiler warning on ixj_pci_tbl Namhyung Kim
2010-12-07 21:16 ` Andrew Morton [this message]
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=20101207131600.b769e3df.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@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