netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing
@ 2016-08-13 11:16 Sean Wang
  2016-08-13 11:16 ` [PATCH 2/2] net: ethernet: mediatek: add the missing of_node_put() after node is used done Sean Wang
       [not found] ` <1471086979-23032-1-git-send-email-sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Sean Wang @ 2016-08-13 11:16 UTC (permalink / raw)
  To: john, davem; +Cc: nbd, netdev, linux-mediatek, keyhaede, Sean Wang

To fix runtime warning with lockdep is enabled due that u64_stats_sync
is not initialized well, so add it.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 3a4726e..f5d2745 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1748,6 +1748,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
 		goto free_netdev;
 	}
 	spin_lock_init(&mac->hw_stats->stats_lock);
+	u64_stats_init(&mac->hw_stats->syncp);
 	mac->hw_stats->reg_offset = id * MTK_STAT_OFFSET;
 
 	SET_NETDEV_DEV(eth->netdev[id], eth->dev);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-13 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-13 11:16 [PATCH 1/2] net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing Sean Wang
2016-08-13 11:16 ` [PATCH 2/2] net: ethernet: mediatek: add the missing of_node_put() after node is used done Sean Wang
     [not found]   ` <1471086979-23032-2-git-send-email-sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-08-13 21:59     ` David Miller
     [not found] ` <1471086979-23032-1-git-send-email-sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-08-13 21:59   ` [PATCH 1/2] net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).