Skip to content

Commit 5cae761

Browse files
edumazetJeff Kirsher
authored andcommitted
i40e: fix build warnings
Fixes following build warnings : drivers/net/ethernet/intel/i40e/i40e_main.c:7057:13: warning: 'i40e_sync_udp_filters_subtask' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8524:13: warning: 'i40e_add_vxlan_port' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8569:13: warning: 'i40e_del_vxlan_port' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8604:13: warning: 'i40e_add_geneve_port' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8651:13: warning: 'i40e_del_geneve_port' defined but not used [-Wunused-function] Fixes: 6a89902 ("i40e: geneve tunnel offload support") Signed-off-by: Eric Dumazet <edumazet@google.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent c85e492 commit 5cae761

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7117,9 +7117,7 @@ static void i40e_service_task(struct work_struct *work)
71177117
i40e_watchdog_subtask(pf);
71187118
i40e_fdir_reinit_subtask(pf);
71197119
i40e_sync_filters_subtask(pf);
7120-
#if IS_ENABLED(CONFIG_VXLAN) || IS_ENABLED(CONFIG_GENEVE)
71217120
i40e_sync_udp_filters_subtask(pf);
7122-
#endif
71237121
i40e_clean_adminq_subtask(pf);
71247122

71257123
i40e_service_event_complete(pf);
@@ -8515,6 +8513,8 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port)
85158513
}
85168514

85178515
#endif
8516+
8517+
#if IS_ENABLED(CONFIG_VXLAN)
85188518
/**
85198519
* i40e_add_vxlan_port - Get notifications about VXLAN ports that come up
85208520
* @netdev: This physical port's netdev
@@ -8524,7 +8524,6 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port)
85248524
static void i40e_add_vxlan_port(struct net_device *netdev,
85258525
sa_family_t sa_family, __be16 port)
85268526
{
8527-
#if IS_ENABLED(CONFIG_VXLAN)
85288527
struct i40e_netdev_priv *np = netdev_priv(netdev);
85298528
struct i40e_vsi *vsi = np->vsi;
85308529
struct i40e_pf *pf = vsi->back;
@@ -8557,7 +8556,6 @@ static void i40e_add_vxlan_port(struct net_device *netdev,
85578556
pf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_VXLAN;
85588557
pf->pending_udp_bitmap |= BIT_ULL(next_idx);
85598558
pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
8560-
#endif
85618559
}
85628560

85638561
/**
@@ -8569,7 +8567,6 @@ static void i40e_add_vxlan_port(struct net_device *netdev,
85698567
static void i40e_del_vxlan_port(struct net_device *netdev,
85708568
sa_family_t sa_family, __be16 port)
85718569
{
8572-
#if IS_ENABLED(CONFIG_VXLAN)
85738570
struct i40e_netdev_priv *np = netdev_priv(netdev);
85748571
struct i40e_vsi *vsi = np->vsi;
85758572
struct i40e_pf *pf = vsi->back;
@@ -8592,9 +8589,10 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
85928589
netdev_warn(netdev, "vxlan port %d was not found, not deleting\n",
85938590
ntohs(port));
85948591
}
8595-
#endif
85968592
}
8593+
#endif
85978594

8595+
#if IS_ENABLED(CONFIG_GENEVE)
85988596
/**
85998597
* i40e_add_geneve_port - Get notifications about GENEVE ports that come up
86008598
* @netdev: This physical port's netdev
@@ -8604,7 +8602,6 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
86048602
static void i40e_add_geneve_port(struct net_device *netdev,
86058603
sa_family_t sa_family, __be16 port)
86068604
{
8607-
#if IS_ENABLED(CONFIG_GENEVE)
86088605
struct i40e_netdev_priv *np = netdev_priv(netdev);
86098606
struct i40e_vsi *vsi = np->vsi;
86108607
struct i40e_pf *pf = vsi->back;
@@ -8639,7 +8636,6 @@ static void i40e_add_geneve_port(struct net_device *netdev,
86398636
pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
86408637

86418638
dev_info(&pf->pdev->dev, "adding geneve port %d\n", ntohs(port));
8642-
#endif
86438639
}
86448640

86458641
/**
@@ -8651,7 +8647,6 @@ static void i40e_add_geneve_port(struct net_device *netdev,
86518647
static void i40e_del_geneve_port(struct net_device *netdev,
86528648
sa_family_t sa_family, __be16 port)
86538649
{
8654-
#if IS_ENABLED(CONFIG_GENEVE)
86558650
struct i40e_netdev_priv *np = netdev_priv(netdev);
86568651
struct i40e_vsi *vsi = np->vsi;
86578652
struct i40e_pf *pf = vsi->back;
@@ -8677,8 +8672,8 @@ static void i40e_del_geneve_port(struct net_device *netdev,
86778672
netdev_warn(netdev, "geneve port %d was not found, not deleting\n",
86788673
ntohs(port));
86798674
}
8680-
#endif
86818675
}
8676+
#endif
86828677

86838678
static int i40e_get_phys_port_id(struct net_device *netdev,
86848679
struct netdev_phys_item_id *ppid)

0 commit comments

Comments
 (0)