diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:47:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:47:12 -0500 |
commit | e42e4ba07bc72c0eb7c7ab3bf9e5076db90d0f37 (patch) | |
tree | f3eec0c563da05c2f0de3463edd45735c9c2f3c7 | |
parent | 7a1fcd5f5130f173b5e824135735ec58f245563e (diff) |
igb: fix anoying type mismatch warning on rx/tx queue sizing
When using "min()", the types of both sides should match. With the cpu
mask changes, the type of num_online_cpus() will now depend on config
options. Use "min_t()" with an explicit type instead.
And make the rx/tx case look the same too, just for sanity.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/net/igb/igb_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 022794e579c7..b82b0fb2056c 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -1457,8 +1457,8 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) | |||
1457 | 1457 | ||
1458 | /* Number of supported queues. */ | 1458 | /* Number of supported queues. */ |
1459 | /* Having more queues than CPUs doesn't make sense. */ | 1459 | /* Having more queues than CPUs doesn't make sense. */ |
1460 | adapter->num_rx_queues = min((u32)IGB_MAX_RX_QUEUES, (u32)num_online_cpus()); | 1460 | adapter->num_rx_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus()); |
1461 | adapter->num_tx_queues = min(IGB_MAX_TX_QUEUES, num_online_cpus()); | 1461 | adapter->num_tx_queues = min_t(u32, IGB_MAX_TX_QUEUES, num_online_cpus()); |
1462 | 1462 | ||
1463 | /* This call may decrease the number of queues depending on | 1463 | /* This call may decrease the number of queues depending on |
1464 | * interrupt mode. */ | 1464 | * interrupt mode. */ |