aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-02-08 02:51:42 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-03-19 05:01:28 -0400
commit6ca435078822d9728318dee49ba4f2ff8a2ead24 (patch)
treee4ebabd2d72aa67f49546fac32c025b1654739db /drivers/net/ethernet
parent35937c055a691a125cf52343cd671f6190ae5b3b (diff)
ixgbe: Two minor fixes for RSS and FDIR set queues functions
This change fixes two minor issues. The first was the fact that we were setting the return value to false twice in the set_rss_queues function. The second is the fact that we should have been using "min_t(int," instead of "min((int)" in set_fdir_queues. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 6259619ec7e7..eb58f13773ad 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4332,8 +4332,6 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
4332 adapter->num_rx_queues = f->indices; 4332 adapter->num_rx_queues = f->indices;
4333 adapter->num_tx_queues = f->indices; 4333 adapter->num_tx_queues = f->indices;
4334 ret = true; 4334 ret = true;
4335 } else {
4336 ret = false;
4337 } 4335 }
4338 4336
4339 return ret; 4337 return ret;
@@ -4354,7 +4352,7 @@ static inline bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter)
4354 bool ret = false; 4352 bool ret = false;
4355 struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR]; 4353 struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR];
4356 4354
4357 f_fdir->indices = min((int)num_online_cpus(), f_fdir->indices); 4355 f_fdir->indices = min_t(int, num_online_cpus(), f_fdir->indices);
4358 f_fdir->mask = 0; 4356 f_fdir->mask = 0;
4359 4357
4360 /* 4358 /*