diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-01-19 09:21:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-20 19:21:22 -0500 |
commit | c1fa347f20f17f14a4a1575727fa24340e8a9117 (patch) | |
tree | 520a4cc063e0f64030ddae6744970c7fcb0785db /drivers/net/ixgbe | |
parent | b4ced2b768ab6c580148d1163c82a655fe147edc (diff) |
e1000/e1000e/igb/igbvf/ixgb/ixgbe: Fix tests of unsigned in *_tx_map()
The variable count and i are unsigned so the (<|>=)0 tests do not work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 9c9202f40b1..6d61add27a0 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5167,14 +5167,14 @@ dma_error: | |||
5167 | tx_buffer_info->dma = 0; | 5167 | tx_buffer_info->dma = 0; |
5168 | tx_buffer_info->time_stamp = 0; | 5168 | tx_buffer_info->time_stamp = 0; |
5169 | tx_buffer_info->next_to_watch = 0; | 5169 | tx_buffer_info->next_to_watch = 0; |
5170 | count--; | 5170 | if (count) |
5171 | count--; | ||
5171 | 5172 | ||
5172 | /* clear timestamp and dma mappings for remaining portion of packet */ | 5173 | /* clear timestamp and dma mappings for remaining portion of packet */ |
5173 | while (count >= 0) { | 5174 | while (count--) { |
5174 | count--; | 5175 | if (i==0) |
5175 | i--; | ||
5176 | if (i < 0) | ||
5177 | i += tx_ring->count; | 5176 | i += tx_ring->count; |
5177 | i--; | ||
5178 | tx_buffer_info = &tx_ring->tx_buffer_info[i]; | 5178 | tx_buffer_info = &tx_ring->tx_buffer_info[i]; |
5179 | ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); | 5179 | ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); |
5180 | } | 5180 | } |