i40evf: hide unused variable
On architectures with larger pages, we get a warning about an unused variable:
drivers/net/ethernet/intel/i40evf/i40evf_main.c: In function 'i40evf_configure_rx':
drivers/net/ethernet/intel/i40evf/i40evf_main.c:690:21: error: unused variable 'netdev' [-Werror=unused-variable]
This moves the declaration into the #ifdef to avoid the warning.
Fixes: dab86afdbb
("i40e/i40evf: Change the way we limit the maximum frame size for Rx")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
hifive-unleashed-5.1
parent
283aeafe6b
commit
3dfc3eb581
|
@ -694,13 +694,14 @@ static void i40evf_configure_tx(struct i40evf_adapter *adapter)
|
||||||
static void i40evf_configure_rx(struct i40evf_adapter *adapter)
|
static void i40evf_configure_rx(struct i40evf_adapter *adapter)
|
||||||
{
|
{
|
||||||
unsigned int rx_buf_len = I40E_RXBUFFER_2048;
|
unsigned int rx_buf_len = I40E_RXBUFFER_2048;
|
||||||
struct net_device *netdev = adapter->netdev;
|
|
||||||
struct i40e_hw *hw = &adapter->hw;
|
struct i40e_hw *hw = &adapter->hw;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Legacy Rx will always default to a 2048 buffer size. */
|
/* Legacy Rx will always default to a 2048 buffer size. */
|
||||||
#if (PAGE_SIZE < 8192)
|
#if (PAGE_SIZE < 8192)
|
||||||
if (!(adapter->flags & I40EVF_FLAG_LEGACY_RX)) {
|
if (!(adapter->flags & I40EVF_FLAG_LEGACY_RX)) {
|
||||||
|
struct net_device *netdev = adapter->netdev;
|
||||||
|
|
||||||
/* For jumbo frames on systems with 4K pages we have to use
|
/* For jumbo frames on systems with 4K pages we have to use
|
||||||
* an order 1 page, so we might as well increase the size
|
* an order 1 page, so we might as well increase the size
|
||||||
* of our Rx buffer to make better use of the available space
|
* of our Rx buffer to make better use of the available space
|
||||||
|
|
Loading…
Reference in New Issue