提交 9f167327 编写于 作者: J Jiri Pirko 提交者: Jakub Kicinski

devlink: remove devl*_port_health_reporter_destroy()

Remove port-specific health reporter destroy function as it is
currently the same as the instance one so no longer needed. Inline
__devlink_health_reporter_destroy() as it is no longer called from
multiple places.
Signed-off-by: NJiri Pirko <jiri@nvidia.com>
Reviewed-by: NJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 1dea3b4e
...@@ -754,6 +754,6 @@ void mlx5e_reporter_rx_destroy(struct mlx5e_priv *priv) ...@@ -754,6 +754,6 @@ void mlx5e_reporter_rx_destroy(struct mlx5e_priv *priv)
if (!priv->rx_reporter) if (!priv->rx_reporter)
return; return;
devlink_port_health_reporter_destroy(priv->rx_reporter); devlink_health_reporter_destroy(priv->rx_reporter);
priv->rx_reporter = NULL; priv->rx_reporter = NULL;
} }
...@@ -609,6 +609,6 @@ void mlx5e_reporter_tx_destroy(struct mlx5e_priv *priv) ...@@ -609,6 +609,6 @@ void mlx5e_reporter_tx_destroy(struct mlx5e_priv *priv)
if (!priv->tx_reporter) if (!priv->tx_reporter)
return; return;
devlink_port_health_reporter_destroy(priv->tx_reporter); devlink_health_reporter_destroy(priv->tx_reporter);
priv->tx_reporter = NULL; priv->tx_reporter = NULL;
} }
...@@ -1889,12 +1889,6 @@ devl_health_reporter_destroy(struct devlink_health_reporter *reporter); ...@@ -1889,12 +1889,6 @@ devl_health_reporter_destroy(struct devlink_health_reporter *reporter);
void void
devlink_health_reporter_destroy(struct devlink_health_reporter *reporter); devlink_health_reporter_destroy(struct devlink_health_reporter *reporter);
void
devl_port_health_reporter_destroy(struct devlink_health_reporter *reporter);
void
devlink_port_health_reporter_destroy(struct devlink_health_reporter *reporter);
void * void *
devlink_health_reporter_priv(struct devlink_health_reporter *reporter); devlink_health_reporter_priv(struct devlink_health_reporter *reporter);
int devlink_health_report(struct devlink_health_reporter *reporter, int devlink_health_report(struct devlink_health_reporter *reporter,
......
...@@ -7442,13 +7442,6 @@ devlink_health_reporter_put(struct devlink_health_reporter *reporter) ...@@ -7442,13 +7442,6 @@ devlink_health_reporter_put(struct devlink_health_reporter *reporter)
devlink_health_reporter_free(reporter); devlink_health_reporter_free(reporter);
} }
static void
__devlink_health_reporter_destroy(struct devlink_health_reporter *reporter)
{
list_del(&reporter->list);
devlink_health_reporter_put(reporter);
}
/** /**
* devl_health_reporter_destroy - destroy devlink health reporter * devl_health_reporter_destroy - destroy devlink health reporter
* *
...@@ -7459,7 +7452,8 @@ devl_health_reporter_destroy(struct devlink_health_reporter *reporter) ...@@ -7459,7 +7452,8 @@ devl_health_reporter_destroy(struct devlink_health_reporter *reporter)
{ {
devl_assert_locked(reporter->devlink); devl_assert_locked(reporter->devlink);
__devlink_health_reporter_destroy(reporter); list_del(&reporter->list);
devlink_health_reporter_put(reporter);
} }
EXPORT_SYMBOL_GPL(devl_health_reporter_destroy); EXPORT_SYMBOL_GPL(devl_health_reporter_destroy);
...@@ -7474,31 +7468,6 @@ devlink_health_reporter_destroy(struct devlink_health_reporter *reporter) ...@@ -7474,31 +7468,6 @@ devlink_health_reporter_destroy(struct devlink_health_reporter *reporter)
} }
EXPORT_SYMBOL_GPL(devlink_health_reporter_destroy); EXPORT_SYMBOL_GPL(devlink_health_reporter_destroy);
/**
* devl_port_health_reporter_destroy - destroy devlink port health reporter
*
* @reporter: devlink health reporter to destroy
*/
void
devl_port_health_reporter_destroy(struct devlink_health_reporter *reporter)
{
devl_assert_locked(reporter->devlink);
__devlink_health_reporter_destroy(reporter);
}
EXPORT_SYMBOL_GPL(devl_port_health_reporter_destroy);
void
devlink_port_health_reporter_destroy(struct devlink_health_reporter *reporter)
{
struct devlink *devlink = reporter->devlink;
devl_lock(devlink);
devl_port_health_reporter_destroy(reporter);
devl_unlock(devlink);
}
EXPORT_SYMBOL_GPL(devlink_port_health_reporter_destroy);
static int static int
devlink_nl_health_reporter_fill(struct sk_buff *msg, devlink_nl_health_reporter_fill(struct sk_buff *msg,
struct devlink_health_reporter *reporter, struct devlink_health_reporter *reporter,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册