From: Alexander Duyck Date: Fri, 27 May 2011 05:31:42 +0000 (+0000) Subject: ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16 X-Git-Tag: v2.6.39-400.9.0~619^2~20 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be130c1b58de019af13a89cd80b8f27e3d1d0210;p=users%2Fjedix%2Flinux-maple.git ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16 This change updates all values dealing with count, next_to_use, and next_to_clean so that they stay u16 values. The advantage of this is that there is no re-casting of type during the propagation through the stack. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher (cherry picked from commit 63544e9c0055316d0397cb671f2ff99d85c77293) Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index b87fd91b4937..7ec9ca88b81b 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -6593,11 +6593,12 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter, struct ixgbe_tx_buffer *tx_buffer_info; unsigned int len; unsigned int total = skb->len; - unsigned int offset = 0, size, count = 0, i; + unsigned int offset = 0, size, count = 0; unsigned int nr_frags = skb_shinfo(skb)->nr_frags; unsigned int f; unsigned int bytecount = skb->len; u16 gso_segs = 1; + u16 i; i = tx_ring->next_to_use; @@ -6863,7 +6864,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring, struct sk_buff *skb, input, common, ring->queue_index); } -static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size) +static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size) { netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index); /* Herbert's original patch had: @@ -6882,7 +6883,7 @@ static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size) return 0; } -static int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, int size) +static int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size) { if (likely(ixgbe_desc_unused(tx_ring) >= size)) return 0; @@ -6920,13 +6921,13 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, struct ixgbe_adapter *adapter, struct ixgbe_ring *tx_ring) { - unsigned int first; unsigned int tx_flags = 0; - u8 hdr_len = 0; int tso; - int count = 0; + u16 count = 0; + u16 first; unsigned int f; __be16 protocol; + u8 hdr_len = 0; protocol = vlan_get_protocol(skb);