Commit 00135227 authored by David S. Miller's avatar David S. Miller

Merge branch 'devlink-delete-publidh-api'

Leon Romanovsky says:

====================
devlink: Delete publish of single parameter API

This short series removes the single parameter publish/unpublish API
that does nothing expect mimics already existing
devlink_paramss_*publish calls.

In near future, we will be able to delete devlink_paramss_*publish too.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents dc50b930 c2d2f988
......@@ -625,7 +625,6 @@ static int mlx5_devlink_eth_param_register(struct devlink *devlink)
devlink_param_driverinit_value_set(devlink,
DEVLINK_PARAM_GENERIC_ID_ENABLE_ETH,
value);
devlink_param_publish(devlink, &enable_eth_param);
return 0;
}
......@@ -636,7 +635,6 @@ static void mlx5_devlink_eth_param_unregister(struct devlink *devlink)
if (!mlx5_eth_supported(dev))
return;
devlink_param_unpublish(devlink, &enable_eth_param);
devlink_param_unregister(devlink, &enable_eth_param);
}
......@@ -673,7 +671,6 @@ static int mlx5_devlink_rdma_param_register(struct devlink *devlink)
devlink_param_driverinit_value_set(devlink,
DEVLINK_PARAM_GENERIC_ID_ENABLE_RDMA,
value);
devlink_param_publish(devlink, &enable_rdma_param);
return 0;
}
......@@ -684,7 +681,6 @@ static void mlx5_devlink_rdma_param_unregister(struct devlink *devlink)
if (!IS_ENABLED(CONFIG_MLX5_INFINIBAND) || MLX5_ESWITCH_MANAGER(dev))
return;
devlink_param_unpublish(devlink, &enable_rdma_param);
devlink_param_unregister(devlink, &enable_rdma_param);
}
......@@ -709,7 +705,6 @@ static int mlx5_devlink_vnet_param_register(struct devlink *devlink)
devlink_param_driverinit_value_set(devlink,
DEVLINK_PARAM_GENERIC_ID_ENABLE_VNET,
value);
devlink_param_publish(devlink, &enable_rdma_param);
return 0;
}
......@@ -720,7 +715,6 @@ static void mlx5_devlink_vnet_param_unregister(struct devlink *devlink)
if (!mlx5_vnet_supported(dev))
return;
devlink_param_unpublish(devlink, &enable_vnet_param);
devlink_param_unregister(devlink, &enable_vnet_param);
}
......@@ -811,7 +805,6 @@ int mlx5_devlink_register(struct devlink *devlink)
if (err)
goto params_reg_err;
mlx5_devlink_set_params_init_values(devlink);
devlink_params_publish(devlink);
err = mlx5_devlink_auxdev_params_register(devlink);
if (err)
......@@ -821,6 +814,7 @@ int mlx5_devlink_register(struct devlink *devlink)
if (err)
goto traps_reg_err;
devlink_params_publish(devlink);
return 0;
traps_reg_err:
......@@ -835,9 +829,9 @@ int mlx5_devlink_register(struct devlink *devlink)
void mlx5_devlink_unregister(struct devlink *devlink)
{
devlink_params_unpublish(devlink);
mlx5_devlink_traps_unregister(devlink);
mlx5_devlink_auxdev_params_unregister(devlink);
devlink_params_unpublish(devlink);
devlink_params_unregister(devlink, mlx5_devlink_params,
ARRAY_SIZE(mlx5_devlink_params));
devlink_unregister(devlink);
......
......@@ -1653,10 +1653,6 @@ void devlink_param_unregister(struct devlink *devlink,
const struct devlink_param *param);
void devlink_params_publish(struct devlink *devlink);
void devlink_params_unpublish(struct devlink *devlink);
void devlink_param_publish(struct devlink *devlink,
const struct devlink_param *param);
void devlink_param_unpublish(struct devlink *devlink,
const struct devlink_param *param);
int devlink_port_params_register(struct devlink_port *devlink_port,
const struct devlink_param *params,
size_t params_count);
......
......@@ -10121,54 +10121,6 @@ void devlink_params_unpublish(struct devlink *devlink)
}
EXPORT_SYMBOL_GPL(devlink_params_unpublish);
/**
* devlink_param_publish - publish one configuration parameter
*
* @devlink: devlink
* @param: one configuration parameter
*
* Publish previously registered configuration parameter.
*/
void devlink_param_publish(struct devlink *devlink,
const struct devlink_param *param)
{
struct devlink_param_item *param_item;
list_for_each_entry(param_item, &devlink->param_list, list) {
if (param_item->param != param || param_item->published)
continue;
param_item->published = true;
devlink_param_notify(devlink, 0, param_item,
DEVLINK_CMD_PARAM_NEW);
break;
}
}
EXPORT_SYMBOL_GPL(devlink_param_publish);
/**
* devlink_param_unpublish - unpublish one configuration parameter
*
* @devlink: devlink
* @param: one configuration parameter
*
* Unpublish previously registered configuration parameter.
*/
void devlink_param_unpublish(struct devlink *devlink,
const struct devlink_param *param)
{
struct devlink_param_item *param_item;
list_for_each_entry(param_item, &devlink->param_list, list) {
if (param_item->param != param || !param_item->published)
continue;
param_item->published = false;
devlink_param_notify(devlink, 0, param_item,
DEVLINK_CMD_PARAM_DEL);
break;
}
}
EXPORT_SYMBOL_GPL(devlink_param_unpublish);
/**
* devlink_port_params_register - register port configuration parameters
*
......
Markdown is supported
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