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:
5960d33
)
i40e: Moving variable declaration out of the loops
author
Akeem G Abodunrin
<
[email protected]
>
Fri, 17 Oct 2014 03:14:39 +0000
(
03:14
+0000)
committer
Jeff Kirsher
<
[email protected]
>
Fri, 24 Oct 2014 03:38:05 +0000
(20:38 -0700)
Move the three variables out of the loop, so it only declares once.
Change-ID: I436913777c7da3c16dc0031b59e3ffa61de74718
Signed-off-by: Akeem G Abodunrin <
[email protected]
>
Signed-off-by: Patrick Lu <
[email protected]
>
Tested-by: Jim Young <
[email protected]
>
Signed-off-by: Jeff Kirsher <
[email protected]
>
drivers/net/ethernet/intel/i40e/i40e_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/i40e/i40e_main.c
b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 9d36d10df868eb9b73cb44f94b3f1be37ef3c73d..b0c10e0f8a9f5404b022121f790f34420981616f 100644
(file)
--- a/
drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/
drivers/net/ethernet/intel/i40e/i40e_main.c
@@
-813,7
+813,10
@@
static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
struct i40e_eth_stats *oes;
struct i40e_eth_stats *es; /* device's eth stats */
u32 tx_restart, tx_busy;
+ struct i40e_ring *p;
u32 rx_page, rx_buf;
+ u64 bytes, packets;
+ unsigned int start;
u64 rx_p, rx_b;
u64 tx_p, tx_b;
u16 q;
@@
-837,10
+840,6
@@
static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
rx_buf = 0;
rcu_read_lock();
for (q = 0; q < vsi->num_queue_pairs; q++) {
- struct i40e_ring *p;
- u64 bytes, packets;
- unsigned int start;
-
/* locate Tx ring */
p = ACCESS_ONCE(vsi->tx_rings[q]);