net: ethernet: mediatek: enhance with avoiding superfluous assignment inside mtk_get_ethtool_stats

data_src is unchanged inside the loop, so this patch moves
the assignment to outside the loop to avoid unnecessarily
assignment

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sean Wang 2016-09-20 11:26:48 +08:00 committed by David S. Miller
parent 8847293992
commit 94d308d060

View file

@ -2137,8 +2137,9 @@ static void mtk_get_ethtool_stats(struct net_device *dev,
}
}
data_src = (u64 *)hwstats;
do {
data_src = (u64 *)hwstats;
data_dst = data;
start = u64_stats_fetch_begin_irq(&hwstats->syncp);