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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGVrzcZAq+5bhNACCFxhQnKa7AY3WuE1ut_h87+5QoOnovK_4Q@mail.gmail.com>
Date:	Tue, 23 Sep 2014 09:54:29 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Tobias Klauser <tklauser@...tanz.ch>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: bcmgenet: Fix compile warning

2014-09-23 6:19 GMT-07:00 Tobias Klauser <tklauser@...tanz.ch>:
> bcmgenet_wol_resume() is only used in bcmgenet_resume(), which is only
> defined when CONFIG_PM_SLEEP is enabled. This leads to the following
> compile warning when building with !CONFIG_PM_SLEEP:
>
> drivers/net/ethernet/broadcom/genet/bcmgenet.c:1967:12: warning: ‘bcmgenet_wol_resume’ defined but not used [-Wunused-function]
>
> Since bcmgenet_resume() is the only user of bcmgenet_wol_resume(), fix
> this by directly inlining the function there.
>
> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>

Acked-by: Florian Fainelli <f.fainelli@...il.com>

> ---
>  drivers/net/ethernet/broadcom/genet/bcmgenet.c | 23 +++++++----------------
>  1 file changed, 7 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> index 313c400..e852d20 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> @@ -1964,19 +1964,6 @@ static void bcmgenet_set_hw_addr(struct bcmgenet_priv *priv,
>         bcmgenet_umac_writel(priv, (addr[4] << 8) | addr[5], UMAC_MAC1);
>  }
>
> -static int bcmgenet_wol_resume(struct bcmgenet_priv *priv)
> -{
> -       /* From WOL-enabled suspend, switch to regular clock */
> -       if (priv->wolopts)
> -               clk_disable_unprepare(priv->clk_wol);
> -
> -       phy_init_hw(priv->phydev);
> -       /* Speed settings must be restored */
> -       bcmgenet_mii_config(priv->dev);
> -
> -       return 0;
> -}
> -
>  /* Returns a reusable dma control register value */
>  static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
>  {
> @@ -2681,9 +2668,13 @@ static int bcmgenet_resume(struct device *d)
>         if (ret)
>                 goto out_clk_disable;
>
> -       ret = bcmgenet_wol_resume(priv);
> -       if (ret)
> -               goto out_clk_disable;
> +       /* From WOL-enabled suspend, switch to regular clock */
> +       if (priv->wolopts)
> +               clk_disable_unprepare(priv->clk_wol);
> +
> +       phy_init_hw(priv->phydev);
> +       /* Speed settings must be restored */
> +       bcmgenet_mii_config(priv->dev);
>
>         /* disable ethernet MAC while updating its registers */
>         umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, false);
> --
> 2.0.1
>
>



-- 
Florian
--
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