2020-02-11 16:35:40

by Yue Haibing

[permalink] [raw]
Subject: [PATCH net-next] sfc: remove unused variable 'efx_default_channel_type'

drivers/net/ethernet/sfc/efx.c:116:38: warning:
efx_default_channel_type defined but not used [-Wunused-const-variable=]

commit 83975485077d ("sfc: move channel alloc/removal code")
left behind this, remove it.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
drivers/net/ethernet/sfc/efx.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 4481f21a1f43..256807c28ff7 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -113,7 +113,6 @@ MODULE_PARM_DESC(debug, "Bitmapped debugging message enable value");
*
*************************************************************************/

-static const struct efx_channel_type efx_default_channel_type;
static void efx_remove_port(struct efx_nic *efx);
static int efx_xdp_setup_prog(struct efx_nic *efx, struct bpf_prog *prog);
static int efx_xdp(struct net_device *dev, struct netdev_bpf *xdp);
--
2.20.1



2020-02-11 16:54:31

by Martin Habets

[permalink] [raw]
Subject: Re: [PATCH net-next] sfc: remove unused variable 'efx_default_channel_type'

On 11/02/2020 14:16, YueHaibing wrote:
> drivers/net/ethernet/sfc/efx.c:116:38: warning:
> efx_default_channel_type defined but not used [-Wunused-const-variable=]

This is a good fix, but net-next is closed at the moment. Please resubmit it when it reopens.

> commit 83975485077d ("sfc: move channel alloc/removal code")
> left behind this, remove it.

Please add this info with a "Fixes:" tag.

Thanks,
Martin

>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> drivers/net/ethernet/sfc/efx.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index 4481f21a1f43..256807c28ff7 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -113,7 +113,6 @@ MODULE_PARM_DESC(debug, "Bitmapped debugging message enable value");
> *
> *************************************************************************/
>
> -static const struct efx_channel_type efx_default_channel_type;
> static void efx_remove_port(struct efx_nic *efx);
> static int efx_xdp_setup_prog(struct efx_nic *efx, struct bpf_prog *prog);
> static int efx_xdp(struct net_device *dev, struct netdev_bpf *xdp);
>

2020-02-19 01:36:11

by Yue Haibing

[permalink] [raw]
Subject: [PATCH v2 net-next] sfc: remove unused variable 'efx_default_channel_type'

drivers/net/ethernet/sfc/efx.c:116:38: warning:
efx_default_channel_type defined but not used [-Wunused-const-variable=]

commit 83975485077d ("sfc: move channel alloc/removal code")
left behind this, remove it.

Reported-by: Hulk Robot <[email protected]>
Fixes: 83975485077d ("sfc: move channel alloc/removal code")
Signed-off-by: YueHaibing <[email protected]>
---
v2: Add Fixes tag
---
drivers/net/ethernet/sfc/efx.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 4481f21..256807c 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -113,7 +113,6 @@ MODULE_PARM_DESC(debug, "Bitmapped debugging message enable value");
*
*************************************************************************/

-static const struct efx_channel_type efx_default_channel_type;
static void efx_remove_port(struct efx_nic *efx);
static int efx_xdp_setup_prog(struct efx_nic *efx, struct bpf_prog *prog);
static int efx_xdp(struct net_device *dev, struct netdev_bpf *xdp);
--
2.7.4


2020-02-19 12:36:06

by Martin Habets

[permalink] [raw]
Subject: Re: [PATCH v2 net-next] sfc: remove unused variable 'efx_default_channel_type'

On 19/02/2020 01:34, YueHaibing wrote:
> drivers/net/ethernet/sfc/efx.c:116:38: warning:
> efx_default_channel_type defined but not used [-Wunused-const-variable=]
>
> commit 83975485077d ("sfc: move channel alloc/removal code")
> left behind this, remove it.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: 83975485077d ("sfc: move channel alloc/removal code")
> Signed-off-by: YueHaibing <[email protected]>

Acked-by: Martin Habets <[email protected]>

> ---
> v2: Add Fixes tag
> ---
> drivers/net/ethernet/sfc/efx.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index 4481f21..256807c 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -113,7 +113,6 @@ MODULE_PARM_DESC(debug, "Bitmapped debugging message enable value");
> *
> *************************************************************************/
>
> -static const struct efx_channel_type efx_default_channel_type;
> static void efx_remove_port(struct efx_nic *efx);
> static int efx_xdp_setup_prog(struct efx_nic *efx, struct bpf_prog *prog);
> static int efx_xdp(struct net_device *dev, struct netdev_bpf *xdp);
>

2020-02-20 00:27:01

by David Miller

[permalink] [raw]
Subject: Re: [PATCH v2 net-next] sfc: remove unused variable 'efx_default_channel_type'

From: YueHaibing <[email protected]>
Date: Wed, 19 Feb 2020 09:34:58 +0800

> drivers/net/ethernet/sfc/efx.c:116:38: warning:
> efx_default_channel_type defined but not used [-Wunused-const-variable=]
>
> commit 83975485077d ("sfc: move channel alloc/removal code")
> left behind this, remove it.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: 83975485077d ("sfc: move channel alloc/removal code")
> Signed-off-by: YueHaibing <[email protected]>
> ---
> v2: Add Fixes tag

Applied, thanks.