[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201008060337.57627.vapier@gentoo.org>
Date: Fri, 6 Aug 2010 03:37:56 -0400
From: Mike Frysinger <vapier@...too.org>
To: Changli Gao <xiaosuo@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] phy: SMSC: fix unused warnings when built into kernel
On Friday, August 06, 2010 02:43:46 Changli Gao wrote:
> On Fri, Aug 6, 2010 at 2:27 PM, Mike Frysinger wrote:
> > If the SMSC phy is not built as a module, we get the warning:
> > drivers/net/phy/smsc.c:257: warning: 'smsc_tbl' defined but not
> > used
> >
> > So mark the structure as maybe unused to avoid this.
> >
> > --- a/drivers/net/phy/smsc.c
> > +++ b/drivers/net/phy/smsc.c
> > @@ -254,7 +254,7 @@ MODULE_LICENSE("GPL");
> > module_init(smsc_init);
> > module_exit(smsc_exit);
> >
> > -static struct mdio_device_id smsc_tbl[] = {
> > +static __maybe_unused struct mdio_device_id smsc_tbl[] = {
> > { 0x0007c0a0, 0xfffffff0 },
> > { 0x0007c0b0, 0xfffffff0 },
> > { 0x0007c0c0, 0xfffffff0 },
>
> How about adding a #ifdef CONFIG_SMSC_PHY_MODULE clause around these
> lines?
imo, the less ifdefs the better
-mike
Download attachment "signature.asc " of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists