net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing
Subsystems (4)
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
@@ -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
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
@@ -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
David Miller
AppliedFrom: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/[email protected]>
Date: Sat, 13 Aug 2016 19:16:18 +0800
Quoted 4 lines
To fix runtime warning with lockdep is enabled due that
u64_stats_syncis not initialized well, so add it.
Applied.
David Miller
AppliedRe: [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 archiveFrom: 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 ofof_parse_phandle()orof_node_get()used byfixed_phy.
Applied.