[PATCH 03/20] e1000: Remove unnecessary variable

Andrey Smirnov andrew.smirnov at gmail.com
Sun Jan 17 19:52:24 PST 2016


There doesn't seem to be any point for having 'nv_packet' variable and
it looks like a leftover from driving porting. Remove it and use
'txpacket' instead

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 drivers/net/e1000/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 05c3a78..66ec72f 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3397,7 +3397,6 @@ static int e1000_poll(struct eth_device *edev)

 static int e1000_transmit(struct eth_device *edev, void *txpacket, int length)
 {
-	void *nv_packet = (void *)txpacket;
 	struct e1000_hw *hw = edev->priv;
 	volatile struct e1000_tx_desc *txp;
 	uint64_t to;
@@ -3405,7 +3404,7 @@ static int e1000_transmit(struct eth_device *edev, void *txpacket, int length)
 	txp = hw->tx_base + hw->tx_tail;
 	hw->tx_tail = (hw->tx_tail + 1) % 8;

-	txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, nv_packet));
+	txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, txpacket));
 	txp->lower.data = cpu_to_le32(hw->txd_cmd | length);
 	txp->upper.data = 0;

--
2.5.0



More information about the barebox mailing list