mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
net/mlx5: mlx5e_hv_vhca_stats_create return type to void
Callers of this functions ignore its return value, as reported by Wang Qing, in one of the return paths, it returns positive values. Since return value is ignored anyways, void out the return type of the function. Reported-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
710ad98c36
commit
20f80ffced
2 changed files with 6 additions and 15 deletions
|
@ -120,14 +120,14 @@ static void mlx5e_hv_vhca_stats_cleanup(struct mlx5_hv_vhca_agent *agent)
|
|||
cancel_delayed_work_sync(&priv->stats_agent.work);
|
||||
}
|
||||
|
||||
int mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv)
|
||||
void mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv)
|
||||
{
|
||||
int buf_len = mlx5e_hv_vhca_stats_buf_size(priv);
|
||||
struct mlx5_hv_vhca_agent *agent;
|
||||
|
||||
priv->stats_agent.buf = kvzalloc(buf_len, GFP_KERNEL);
|
||||
if (!priv->stats_agent.buf)
|
||||
return -ENOMEM;
|
||||
return;
|
||||
|
||||
agent = mlx5_hv_vhca_agent_create(priv->mdev->hv_vhca,
|
||||
MLX5_HV_VHCA_AGENT_STATS,
|
||||
|
@ -142,13 +142,11 @@ int mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv)
|
|||
PTR_ERR(agent));
|
||||
|
||||
kvfree(priv->stats_agent.buf);
|
||||
return IS_ERR_OR_NULL(agent);
|
||||
return;
|
||||
}
|
||||
|
||||
priv->stats_agent.agent = agent;
|
||||
INIT_DELAYED_WORK(&priv->stats_agent.work, mlx5e_hv_vhca_stats_work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mlx5e_hv_vhca_stats_destroy(struct mlx5e_priv *priv)
|
||||
|
|
|
@ -7,19 +7,12 @@
|
|||
|
||||
#if IS_ENABLED(CONFIG_PCI_HYPERV_INTERFACE)
|
||||
|
||||
int mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv);
|
||||
void mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv);
|
||||
void mlx5e_hv_vhca_stats_destroy(struct mlx5e_priv *priv);
|
||||
|
||||
#else
|
||||
|
||||
static inline int mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void mlx5e_hv_vhca_stats_destroy(struct mlx5e_priv *priv)
|
||||
{
|
||||
}
|
||||
static inline void mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv) {}
|
||||
static inline void mlx5e_hv_vhca_stats_destroy(struct mlx5e_priv *priv) {}
|
||||
#endif
|
||||
|
||||
#endif /* __MLX5_EN_STATS_VHCA_H__ */
|
||||
|
|
Loading…
Reference in a new issue