]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off
authorSaeed Mahameed <saeedm@mellanox.com>
Thu, 11 Jul 2019 19:39:57 +0000 (19:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jul 2019 22:04:38 +0000 (15:04 -0700)
commitd94b12e756dd26cf2417b17bf231568136b7f983
tree3d6ecb2aa328cee0eda02cbaf9ce41ccf2b95937
parentf2315508b3d6935493e3f54caebc89ed0d99ef0e
net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off

In mlx5e_setup_tc "priv" variable is not being used if
CONFIG_MLX5_ESWITCH is off, one way to fix this is to actually use it.

mlx5e_setup_tc_mqprio also needs the "priv" variable and it extracts it
on its own. We can simply pass priv to mlx5e_setup_tc_mqprio instead of
netdev and avoid extracting the priv var, which will also resolve the
compiler warning.

Fixes: 3b08b23d1b17 ("net: flow_offload: add flow_block_cb_setup_simple()")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
CC: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c