Skip to content

Commit 4d0710c

Browse files
Andre GuedesJeff Kirsher
authored andcommitted
igc: Get rid of igc_max_channels()
The local function igc_max_channels() is a pointless wrapper around igc_get_max_rss_queues(). This patch removes it and updates the callers accordingly. It also does some cleanup on igc_get_max_rss_queues(). Signed-off-by: Andre Guedes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 8e34cad commit 4d0710c

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

drivers/net/ethernet/intel/igc/igc_ethtool.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,18 +1508,13 @@ static int igc_set_rxfh(struct net_device *netdev, const u32 *indir,
15081508
return 0;
15091509
}
15101510

1511-
static unsigned int igc_max_channels(struct igc_adapter *adapter)
1512-
{
1513-
return igc_get_max_rss_queues(adapter);
1514-
}
1515-
15161511
static void igc_get_channels(struct net_device *netdev,
15171512
struct ethtool_channels *ch)
15181513
{
15191514
struct igc_adapter *adapter = netdev_priv(netdev);
15201515

15211516
/* Report maximum channels */
1522-
ch->max_combined = igc_max_channels(adapter);
1517+
ch->max_combined = igc_get_max_rss_queues(adapter);
15231518

15241519
/* Report info for other vector */
15251520
if (adapter->flags & IGC_FLAG_HAS_MSIX) {
@@ -1546,7 +1541,7 @@ static int igc_set_channels(struct net_device *netdev,
15461541
return -EINVAL;
15471542

15481543
/* Verify the number of channels doesn't exceed hw limits */
1549-
max_combined = igc_max_channels(adapter);
1544+
max_combined = igc_get_max_rss_queues(adapter);
15501545
if (count > max_combined)
15511546
return -EINVAL;
15521547

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,12 +2731,7 @@ void igc_set_flag_queue_pairs(struct igc_adapter *adapter,
27312731

27322732
unsigned int igc_get_max_rss_queues(struct igc_adapter *adapter)
27332733
{
2734-
unsigned int max_rss_queues;
2735-
2736-
/* Determine the maximum number of RSS queues supported. */
2737-
max_rss_queues = IGC_MAX_RX_QUEUES;
2738-
2739-
return max_rss_queues;
2734+
return IGC_MAX_RX_QUEUES;
27402735
}
27412736

27422737
static void igc_init_queue_configuration(struct igc_adapter *adapter)

0 commit comments

Comments
 (0)