Skip to content

Commit

Permalink
net: ethernet: mediatek: enhance with avoiding superfluous assignment…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
moore-bros authored and davem330 committed Sep 21, 2016
1 parent 8847293 commit 94d308d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 94d308d

Please sign in to comment.