From: Nathan Chancellor Date: Sat, 14 Mar 2020 03:40:20 +0000 (-0700) Subject: net/mlx5: Add missing inline to stub esw_add_restore_rule X-Git-Tag: v5.15~4200^2~130^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d3faa51bef05d21e908f2c1bd932a5cfac59b63;p=platform%2Fkernel%2Flinux-starfive.git net/mlx5: Add missing inline to stub esw_add_restore_rule When CONFIG_MLX5_ESWITCH is unset, clang warns: In file included from drivers/net/ethernet/mellanox/mlx5/core/main.c:58: drivers/net/ethernet/mellanox/mlx5/core/eswitch.h:670:1: warning: unused function 'esw_add_restore_rule' [-Wunused-function] esw_add_restore_rule(struct mlx5_eswitch *esw, u32 tag) ^ 1 warning generated. This stub function is missing inline; add it to suppress the warning. Fixes: 11b717d61526 ("net/mlx5: E-Switch, Get reg_c0 value on CQE") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index 91b2aed..2318c1c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -677,7 +677,7 @@ static inline const u32 *mlx5_esw_query_functions(struct mlx5_core_dev *dev) static inline void mlx5_eswitch_update_num_of_vfs(struct mlx5_eswitch *esw, const int num_vfs) {} -static struct mlx5_flow_handle * +static inline struct mlx5_flow_handle * esw_add_restore_rule(struct mlx5_eswitch *esw, u32 tag) { return ERR_PTR(-EOPNOTSUPP);