lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1c3219ac5df2da7a3643b253c34b373287ec8ddf.camel@mellanox.com>
Date:   Fri, 12 Jul 2019 18:25:08 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "davem@...emloft.net" <davem@...emloft.net>,
        "arnd@...db.de" <arnd@...db.de>,
        "leon@...nel.org" <leon@...nel.org>
CC:     Aya Levin <ayal@...lanox.com>,
        Maxim Mikityanskiy <maximmi@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>,
        "pablo@...filter.org" <pablo@...filter.org>,
        Tariq Toukan <tariqt@...lanox.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "jakub.kicinski@...ronome.com" <jakub.kicinski@...ronome.com>,
        Eran Ben Elisha <eranbe@...lanox.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [net-next, netfilter] mlx5: avoid unused variable warning

On Fri, 2019-07-12 at 10:57 +0200, Arnd Bergmann wrote:
> Without CONFIG_MLX5_ESWITCH we get a harmless warning:
> 
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c:3467:21: error:
> unused variable 'priv' [-Werror,-Wunused-variable]
>         struct mlx5e_priv *priv = netdev_priv(dev);
> 

Hi Arnd,

thanks for your patch, a similar patch that addresses this issue was
already submitted and applied to net-next [1]

[1] https://www.spinics.net/lists/netdev/msg585433.html

> Hide the declaration in the same #ifdef as its usage.
> 
> Fixes: 4e95bc268b91 ("net: flow_offload: add
> flow_block_cb_setup_simple()")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 6d0ae87c8ded..b562ba904ea1 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -3464,7 +3464,9 @@ static LIST_HEAD(mlx5e_block_cb_list);
>  static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type
> type,
>  			  void *type_data)
>  {
> +#ifdef CONFIG_MLX5_ESWITCH
>  	struct mlx5e_priv *priv = netdev_priv(dev);
> +#endif
>  
>  	switch (type) {
>  #ifdef CONFIG_MLX5_ESWITCH

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ