diff options
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 1216bae913e3..24f7291dbe57 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | |||
@@ -935,12 +935,12 @@ static int ixgbe_set_ringparam(struct net_device *netdev, | |||
935 | if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) | 935 | if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) |
936 | return -EINVAL; | 936 | return -EINVAL; |
937 | 937 | ||
938 | new_rx_count = max(ring->rx_pending, (u32)IXGBE_MIN_RXD); | 938 | new_rx_count = max_t(u32, ring->rx_pending, IXGBE_MIN_RXD); |
939 | new_rx_count = min(new_rx_count, (u32)IXGBE_MAX_RXD); | 939 | new_rx_count = min_t(u32, new_rx_count, IXGBE_MAX_RXD); |
940 | new_rx_count = ALIGN(new_rx_count, IXGBE_REQ_RX_DESCRIPTOR_MULTIPLE); | 940 | new_rx_count = ALIGN(new_rx_count, IXGBE_REQ_RX_DESCRIPTOR_MULTIPLE); |
941 | 941 | ||
942 | new_tx_count = max(ring->tx_pending, (u32)IXGBE_MIN_TXD); | 942 | new_tx_count = max_t(u32, ring->tx_pending, IXGBE_MIN_TXD); |
943 | new_tx_count = min(new_tx_count, (u32)IXGBE_MAX_TXD); | 943 | new_tx_count = min_t(u32, new_tx_count, IXGBE_MAX_TXD); |
944 | new_tx_count = ALIGN(new_tx_count, IXGBE_REQ_TX_DESCRIPTOR_MULTIPLE); | 944 | new_tx_count = ALIGN(new_tx_count, IXGBE_REQ_TX_DESCRIPTOR_MULTIPLE); |
945 | 945 | ||
946 | if ((new_tx_count == adapter->tx_ring[0]->count) && | 946 | if ((new_tx_count == adapter->tx_ring[0]->count) && |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 71ced437be70..fce33f1f9151 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -4316,7 +4316,7 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter) | |||
4316 | if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) | 4316 | if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) |
4317 | return false; | 4317 | return false; |
4318 | 4318 | ||
4319 | f->indices = min((int)num_online_cpus(), f->indices); | 4319 | f->indices = min_t(int, num_online_cpus(), f->indices); |
4320 | 4320 | ||
4321 | adapter->num_rx_queues = 1; | 4321 | adapter->num_rx_queues = 1; |
4322 | adapter->num_tx_queues = 1; | 4322 | adapter->num_tx_queues = 1; |
@@ -4352,8 +4352,8 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter) | |||
4352 | return false; | 4352 | return false; |
4353 | 4353 | ||
4354 | /* Map queue offset and counts onto allocated tx queues */ | 4354 | /* Map queue offset and counts onto allocated tx queues */ |
4355 | per_tc_q = min(dev->num_tx_queues / tcs, (unsigned int)DCB_QUEUE_CAP); | 4355 | per_tc_q = min_t(unsigned int, dev->num_tx_queues / tcs, DCB_QUEUE_CAP); |
4356 | q = min((int)num_online_cpus(), per_tc_q); | 4356 | q = min_t(int, num_online_cpus(), per_tc_q); |
4357 | 4357 | ||
4358 | for (i = 0; i < tcs; i++) { | 4358 | for (i = 0; i < tcs; i++) { |
4359 | netdev_set_tc_queue(dev, i, q, offset); | 4359 | netdev_set_tc_queue(dev, i, q, offset); |
@@ -5146,7 +5146,7 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
5146 | hw->subsystem_device_id = pdev->subsystem_device; | 5146 | hw->subsystem_device_id = pdev->subsystem_device; |
5147 | 5147 | ||
5148 | /* Set capability flags */ | 5148 | /* Set capability flags */ |
5149 | rss = min(IXGBE_MAX_RSS_INDICES, (int)num_online_cpus()); | 5149 | rss = min_t(int, IXGBE_MAX_RSS_INDICES, num_online_cpus()); |
5150 | adapter->ring_feature[RING_F_RSS].indices = rss; | 5150 | adapter->ring_feature[RING_F_RSS].indices = rss; |
5151 | adapter->flags |= IXGBE_FLAG_RSS_ENABLED; | 5151 | adapter->flags |= IXGBE_FLAG_RSS_ENABLED; |
5152 | switch (hw->mac.type) { | 5152 | switch (hw->mac.type) { |