Skip to contentSkip to conversation

net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing

PATCH Applied Sean Wang 2 participants 4 messages Aug 13, 2016 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore

Sean Wang

author
#0 lore raw

PATCH 1/2 net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing

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

---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -0
index 3a4726e..f5d2745 100644
@@ -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);
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 net: ethernet: mediatek: add the missing of_node_put() after node is used done

This patch adds the missing of_node_put() after finishing the usage of of_parse_phandle() or of_node_get() used by fixed_phy.

---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +2 -0
index f5d2745..88b04dd 100644
@@ -269,6 +269,8 @@ static int mtk_phy_connect(struct mtk_mac *mac)
 				    ADVERTISED_Autoneg;
 	phy_start_aneg(mac->phy_dev);
 
+	of_node_put(np);
+
 	return 0;
 }
 
Signature · 1 line
1.7.9.5
Applied
#3 lore raw

Re: [PATCH 2/2] net: ethernet: mediatek: add the missing of_node_put() after node is used done

In reply to a message not in the archive

From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/[email protected]>
Date: Sat, 13 Aug 2016 19:16:19 +0800

Quoted 4 lines

This patch adds the missing of_node_put() after finishing the usage of of_parse_phandle() or of_node_get() used by fixed_phy.

Applied.