Skip to content
Commit daa664a5 authored by Vlad Buslov's avatar Vlad Buslov Committed by David S. Miller
Browse files

net/mlx5e: Move local var definition into ifdef block



New local variable "struct flow_block_offload *f" was added to
mlx5e_setup_tc() in recent rtnl lock removal patches. The variable is used
in code that is only compiled when CONFIG_MLX5_ESWITCH is enabled. This
results compilation warning about unused variable when CONFIG_MLX5_ESWITCH
is not set. Move the variable definition into eswitch-specific code block
from the beginning of mlx5e_setup_tc() function.

Fixes: c9f14470 ("net: sched: add API for registering unlocked offload block callbacks")
Reported-by: default avatartanhuazhong <tanhuazhong@huawei.com>
Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f2b795ea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment