From: Alexander Duyck Date: Wed, 8 Feb 2012 07:51:42 +0000 (+0000) Subject: ixgbe: Two minor fixes for RSS and FDIR set queues functions X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~82 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5926146304fbe9ba0c979e1686b7775cd84f9d9c;p=users%2Fjedix%2Flinux-maple.git 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. (cherry picked from commit 6ca435078822d9728318dee49ba4f2ff8a2ead24) Signed-off-by: Alexander Duyck Tested-by: Stephen Ko Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index a6041e9106b8f..b735bf7d76dfc 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -4263,8 +4263,6 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter) adapter->num_rx_queues = f->indices; adapter->num_tx_queues = f->indices; ret = true; - } else { - ret = false; } return ret; @@ -4285,7 +4283,7 @@ static inline bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter) bool ret = false; struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR]; - f_fdir->indices = min((int)num_online_cpus(), f_fdir->indices); + f_fdir->indices = min_t(int, num_online_cpus(), f_fdir->indices); f_fdir->mask = 0; /*