[PATCH 4/4] ec_bhf: use once variable removal.

From: Francois Romieu
Date: Sat May 03 2014 - 05:40:37 EST


Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>
---
drivers/net/ethernet/ec_bhf.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c
index c697b48..10dbcc4 100644
--- a/drivers/net/ethernet/ec_bhf.c
+++ b/drivers/net/ethernet/ec_bhf.c
@@ -448,16 +448,13 @@ static int ec_bhf_alloc_dma_mem(struct ec_bhf_priv *priv,
static void ec_bhf_setup_tx_descs(struct ec_bhf_priv *priv)
{
struct tx_desc *descs = (struct tx_desc *) priv->tx_buf.buf;
- int dcount, i;
+ int i;

INIT_LIST_HEAD(&priv->tx_desc_free);
INIT_LIST_HEAD(&priv->tx_desc_queue);

- dcount = priv->tx_buf.len / sizeof(struct tx_desc);
- for (i = 0; i < dcount; i++) {
- struct tx_desc *desc = descs + i;
- list_add_tail(&desc->node, &priv->tx_desc_free);
- }
+ for (i = 0; i < priv->tx_buf.len / sizeof(struct tx_desc); i++)
+ list_add_tail(&descs[i].node, &priv->tx_desc_free);
}

static void ec_bhf_setup_rx_descs(struct ec_bhf_priv *priv)
--
1.9.0


--h31gzZEtNLTqOjlF--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/