[PATCH v2 05/22] e1000: Remove unnecessary variable

Andrey Smirnov andrew.smirnov at gmail.com
Wed Jun 1 21:58:34 PDT 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 978e525..6d92cde 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3396,7 +3396,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;
@@ -3404,7 +3403,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.5




More information about the barebox mailing list