projects
/
platform
/
kernel
/
linux-rpi.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
481f360
..
ca6b501
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);