diff options
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index 90b89a81f66..f2b28254f2a 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -735,17 +735,17 @@ static int igb_set_ringparam(struct net_device *netdev, | |||
735 | struct igb_adapter *adapter = netdev_priv(netdev); | 735 | struct igb_adapter *adapter = netdev_priv(netdev); |
736 | struct igb_ring *temp_ring; | 736 | struct igb_ring *temp_ring; |
737 | int i, err = 0; | 737 | int i, err = 0; |
738 | u32 new_rx_count, new_tx_count; | 738 | u16 new_rx_count, new_tx_count; |
739 | 739 | ||
740 | if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) | 740 | if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) |
741 | return -EINVAL; | 741 | return -EINVAL; |
742 | 742 | ||
743 | new_rx_count = min(ring->rx_pending, (u32)IGB_MAX_RXD); | 743 | new_rx_count = min_t(u32, ring->rx_pending, IGB_MAX_RXD); |
744 | new_rx_count = max(new_rx_count, (u32)IGB_MIN_RXD); | 744 | new_rx_count = max_t(u16, new_rx_count, IGB_MIN_RXD); |
745 | new_rx_count = ALIGN(new_rx_count, REQ_RX_DESCRIPTOR_MULTIPLE); | 745 | new_rx_count = ALIGN(new_rx_count, REQ_RX_DESCRIPTOR_MULTIPLE); |
746 | 746 | ||
747 | new_tx_count = min(ring->tx_pending, (u32)IGB_MAX_TXD); | 747 | new_tx_count = min_t(u32, ring->tx_pending, IGB_MAX_TXD); |
748 | new_tx_count = max(new_tx_count, (u32)IGB_MIN_TXD); | 748 | new_tx_count = max_t(u16, new_tx_count, IGB_MIN_TXD); |
749 | new_tx_count = ALIGN(new_tx_count, REQ_TX_DESCRIPTOR_MULTIPLE); | 749 | new_tx_count = ALIGN(new_tx_count, REQ_TX_DESCRIPTOR_MULTIPLE); |
750 | 750 | ||
751 | if ((new_tx_count == adapter->tx_ring_count) && | 751 | if ((new_tx_count == adapter->tx_ring_count) && |