e1000: fix wrong queue idx calculation
authorHong Zhiguo <zhiguohong@tencent.com>
Tue, 22 Oct 2013 18:32:56 +0000 (18:32 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 1 Nov 2013 12:45:29 +0000 (05:45 -0700)
tx_ring and adapter->tx_ring are already of type "struct
e1000_tx_ring *"

Signed-off-by: Hong Zhiguo <zhiguohong@tencent.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000/e1000_main.c

index 59ad007dd5aa09a6123cbd25db7c7b8f4e06f1b7..ad6800ad1bfcb41a66a387fd077b96a59140a25d 100644 (file)
@@ -3917,8 +3917,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter,
                              "  next_to_watch        <%x>\n"
                              "  jiffies              <%lx>\n"
                              "  next_to_watch.status <%x>\n",
-                               (unsigned long)((tx_ring - adapter->tx_ring) /
-                                       sizeof(struct e1000_tx_ring)),
+                               (unsigned long)(tx_ring - adapter->tx_ring),
                                readl(hw->hw_addr + tx_ring->tdh),
                                readl(hw->hw_addr + tx_ring->tdt),
                                tx_ring->next_to_use,