Message ID | 1474342008-22496-1-git-send-email-sean.wang@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
From: <sean.wang@mediatek.com> Date: Tue, 20 Sep 2016 11:26:48 +0800 > From: Sean Wang <sean.wang@mediatek.com> > > 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> Applied.
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 481f360..ca6b501 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -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);