lkml.org 
[lkml]   [2020]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] [net-next] mtk-star-emac: mark PM functions as __maybe_unused
śr., 27 maj 2020 o 15:35 Arnd Bergmann <arnd@arndb.de> napisał(a):
>
> Without CONFIG_PM, the compiler warns about two unused functions:
>
> drivers/net/ethernet/mediatek/mtk_star_emac.c:1472:12: error: unused function 'mtk_star_suspend' [-Werror,-Wunused-function]
> drivers/net/ethernet/mediatek/mtk_star_emac.c:1488:12: error: unused function 'mtk_star_resume' [-Werror,-Wunused-function]
>
> Mark these as __maybe_unused.
>
> Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/mediatek/mtk_star_emac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c
> index b18ce47c4f2e..3223567fe1cb 100644
> --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c
> +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c
> @@ -1469,7 +1469,7 @@ static int mtk_star_mdio_init(struct net_device *ndev)
> return ret;
> }
>
> -static int mtk_star_suspend(struct device *dev)
> +static __maybe_unused int mtk_star_suspend(struct device *dev)
> {
> struct mtk_star_priv *priv;
> struct net_device *ndev;
> @@ -1485,7 +1485,7 @@ static int mtk_star_suspend(struct device *dev)
> return 0;
> }
>
> -static int mtk_star_resume(struct device *dev)
> +static __maybe_unused int mtk_star_resume(struct device *dev)
> {
> struct mtk_star_priv *priv;
> struct net_device *ndev;
> --
> 2.26.2
>

Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

\
 
 \ /
  Last update: 2020-05-27 15:38    [W:0.070 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site