aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2010-11-16 22:27:06 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-11-16 22:27:06 -0500
commit9d6b758f428d2ad9ca4208d5c4d4cdbd4261b0d8 (patch)
tree2b0614b71ec71395b9c62029396573450a92716c /drivers/net/ixgbe/ixgbe_main.c
parent673ac60461082e07be58b23f237d651c2605ce60 (diff)
ixgbe: cleanup unnecessary return value in ixgbe_cache_ring_rss
This change is just to cleanup some confusing logic in ixgbe_cache_ring_rss which can be simplified by adding a conditional with return to the start of the call. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index af4ef29cae11..5f7929f52fe4 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4295,19 +4295,16 @@ static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
4295static inline bool ixgbe_cache_ring_rss(struct ixgbe_adapter *adapter) 4295static inline bool ixgbe_cache_ring_rss(struct ixgbe_adapter *adapter)
4296{ 4296{
4297 int i; 4297 int i;
4298 bool ret = false;
4299 4298
4300 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 4299 if (!(adapter->flags & IXGBE_FLAG_RSS_ENABLED))
4301 for (i = 0; i < adapter->num_rx_queues; i++) 4300 return false;
4302 adapter->rx_ring[i]->reg_idx = i;
4303 for (i = 0; i < adapter->num_tx_queues; i++)
4304 adapter->tx_ring[i]->reg_idx = i;
4305 ret = true;
4306 } else {
4307 ret = false;
4308 }
4309 4301
4310 return ret; 4302 for (i = 0; i < adapter->num_rx_queues; i++)
4303 adapter->rx_ring[i]->reg_idx = i;
4304 for (i = 0; i < adapter->num_tx_queues; i++)
4305 adapter->tx_ring[i]->reg_idx = i;
4306
4307 return true;
4311} 4308}
4312 4309
4313#ifdef CONFIG_IXGBE_DCB 4310#ifdef CONFIG_IXGBE_DCB