mtk-star-emac: mark PM functions as __maybe_unused
Subsystems (4)
PATCH 1/1 mtk-star-emac: mark PM functions as __maybe_unused
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.
--- drivers/net/ethernet/mediatek/mtk_star_emac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/mediatek/mtk_star_emac.c +2 -2
@@ -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;
Signature · 7 lines
2.26.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
śr., 27 maj 2020 o 15:35 Arnd Bergmann <[email protected]> napisał(a):
Quoted 37 lines
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 <[email protected]>--- drivers/net/ethernet/mediatek/mtk_star_emac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/mediatek/mtk_star_emac.c +2
-3@@ -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; --
Quoted 2 lines
2.26.2
From: Arnd Bergmann <[email protected]>
Date: Wed, 27 May 2020 15:34:45 +0200
Quoted 9 lines
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 <[email protected]>
Applied, thank you.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel