Commit 0d86df80 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller

tg3: Reduce indent level of tg3_rx_prodring_alloc

This patch adds an inverted "jumbo ring enable" test and jumps to the exit
if it succeeds.  The change reduces the indent level of the remaining
code making it more readable.
Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 14417063
...@@ -6087,7 +6087,9 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp, ...@@ -6087,7 +6087,9 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
memset(tpr->rx_jmb, 0, TG3_RX_JUMBO_RING_BYTES); memset(tpr->rx_jmb, 0, TG3_RX_JUMBO_RING_BYTES);
if (tp->tg3_flags & TG3_FLAG_JUMBO_RING_ENABLE) { if (!(tp->tg3_flags & TG3_FLAG_JUMBO_RING_ENABLE))
goto done;
for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) { for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) {
struct tg3_rx_buffer_desc *rxd; struct tg3_rx_buffer_desc *rxd;
...@@ -6100,8 +6102,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp, ...@@ -6100,8 +6102,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
} }
for (i = 0; i < tp->rx_jumbo_pending; i++) { for (i = 0; i < tp->rx_jumbo_pending; i++) {
if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_JUMBO, if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_JUMBO, i) < 0) {
i) < 0) {
printk(KERN_WARNING PFX printk(KERN_WARNING PFX
"%s: Using a smaller RX jumbo ring, " "%s: Using a smaller RX jumbo ring, "
"only %d out of %d buffers were " "only %d out of %d buffers were "
...@@ -6113,7 +6114,6 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp, ...@@ -6113,7 +6114,6 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
break; break;
} }
} }
}
done: done:
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment