* [PATCH 1/3] i40e: fix build warning
@ 2016-01-25 6:10 Sudip Mukherjee
2016-01-26 0:01 ` Jeff Kirsher
0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2016-01-25 6:10 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg, Shannon Nelson, Carolyn Wyborny,
Don Skidmore, Bruce Allan, John Ronciak, Mitch Williams
Cc: linux-kernel, intel-wired-lan, netdev, Sudip Mukherjee
While building we are getting warning about:
i40e_main.c:8604:13: warning: 'i40e_add_geneve_port' defined but not used
and
i40e_main.c:8651:13: warning: 'i40e_del_geneve_port' defined but not used
The contents of these functions are defined under CONFIG_GENEVE, so if
CONFIG_GENEVE is not defined then we are having unused empty functions.
Lets have these functions under CONFIG_GENEVE as the callback is already
defined under CONFIG_GENEVE there is no chance of any failure.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index bb4612c..c258697 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8595,6 +8595,7 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
#endif
}
+#if IS_ENABLED(CONFIG_GENEVE)
/**
* i40e_add_geneve_port - Get notifications about GENEVE ports that come up
* @netdev: This physical port's netdev
@@ -8604,7 +8605,6 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
static void i40e_add_geneve_port(struct net_device *netdev,
sa_family_t sa_family, __be16 port)
{
-#if IS_ENABLED(CONFIG_GENEVE)
struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back;
@@ -8639,7 +8639,6 @@ static void i40e_add_geneve_port(struct net_device *netdev,
pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
dev_info(&pf->pdev->dev, "adding geneve port %d\n", ntohs(port));
-#endif
}
/**
@@ -8651,7 +8650,6 @@ static void i40e_add_geneve_port(struct net_device *netdev,
static void i40e_del_geneve_port(struct net_device *netdev,
sa_family_t sa_family, __be16 port)
{
-#if IS_ENABLED(CONFIG_GENEVE)
struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back;
@@ -8677,8 +8675,8 @@ static void i40e_del_geneve_port(struct net_device *netdev,
netdev_warn(netdev, "geneve port %d was not found, not deleting\n",
ntohs(port));
}
-#endif
}
+#endif
static int i40e_get_phys_port_id(struct net_device *netdev,
struct netdev_phys_item_id *ppid)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] i40e: fix build warning
2016-01-25 6:10 [PATCH 1/3] i40e: fix build warning Sudip Mukherjee
@ 2016-01-26 0:01 ` Jeff Kirsher
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2016-01-26 0:01 UTC (permalink / raw)
To: Sudip Mukherjee, Jesse Brandeburg, Shannon Nelson,
Carolyn Wyborny, Don Skidmore, Bruce Allan, John Ronciak,
Mitch Williams
Cc: linux-kernel, intel-wired-lan, netdev
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
On Mon, 2016-01-25 at 11:40 +0530, Sudip Mukherjee wrote:
> While building we are getting warning about:
> i40e_main.c:8604:13: warning: 'i40e_add_geneve_port' defined but not
> used
> and
> i40e_main.c:8651:13: warning: 'i40e_del_geneve_port' defined but not
> used
>
> The contents of these functions are defined under CONFIG_GENEVE, so
> if
> CONFIG_GENEVE is not defined then we are having unused empty
> functions.
> Lets have these functions under CONFIG_GENEVE as the callback is
> already
> defined under CONFIG_GENEVE there is no chance of any failure.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
This is not a complete fix for the issue and Eric Dumazet has already
submitted a fix for the issue, which I have just sent to David Miller
in a pull-request.
So I have dropped this patch, in favor of Eric's solution.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-26 0:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 6:10 [PATCH 1/3] i40e: fix build warning Sudip Mukherjee
2016-01-26 0:01 ` Jeff Kirsher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).