lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=_-ZZ8nyFLiBKSWNTcM_SkwLe2-ZL17zBQb0i4@mail.gmail.com>
Date:	Fri, 6 Aug 2010 14:43:46 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	Mike Frysinger <vapier@...too.org>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] phy: SMSC: fix unused warnings when built into kernel

On Fri, Aug 6, 2010 at 2:27 PM, Mike Frysinger <vapier@...too.org> 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.
>
> Signed-off-by: Mike Frysinger <vapier@...too.org>
> ---
>  drivers/net/phy/smsc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
> index 78fa988..11944ef 100644
> --- 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?

-- 
Regards,
Changli Gao(xiaosuo@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ