projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8847293
)
net: ethernet: mediatek: enhance with avoiding superfluous assignment inside mtk_get_...
author
Sean Wang
<sean.wang@mediatek.com>
Tue, 20 Sep 2016 03:26:48 +0000
(11:26 +0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 21 Sep 2016 04:06:32 +0000
(
00:06
-0400)
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>
drivers/net/ethernet/mediatek/mtk_eth_soc.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 481f3609a1ea23a5bc727a173528696d2ea59ac2..ca6b5013e27541bf01a66fdb7a63912e492fde5a 100644
(file)
--- 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);