diff options
author | Moshe Shemesh <moshe@nvidia.com> | 2022-07-11 01:14:05 -0700 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-07-12 10:26:22 +0200 |
commit | df539fc62b069ed2b2395d8d1c77f7758c5001a6 (patch) | |
tree | 3a2f3eeab193f15d883aa8b53701c578c36bac7f /net/core | |
parent | da212bd29d7fdc326f0be47d15183d62e9c7c172 (diff) | |
download | linux-df539fc62b069ed2b2395d8d1c77f7758c5001a6.tar.bz2 |
devlink: Remove unused functions devlink_rate_leaf_create/destroy
The previous patch removed the last usage of the functions
devlink_rate_leaf_create() and devlink_rate_nodes_destroy(). Thus,
remove these function from devlink API.
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/devlink.c | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 1588e2246234..970e5c2a52bd 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -10006,20 +10006,13 @@ int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv) } EXPORT_SYMBOL_GPL(devl_rate_leaf_create); -int -devlink_rate_leaf_create(struct devlink_port *devlink_port, void *priv) -{ - struct devlink *devlink = devlink_port->devlink; - int ret; - - mutex_lock(&devlink->lock); - ret = devl_rate_leaf_create(devlink_port, priv); - mutex_unlock(&devlink->lock); - - return ret; -} -EXPORT_SYMBOL_GPL(devlink_rate_leaf_create); - +/** + * devl_rate_leaf_destroy - destroy devlink rate leaf + * + * @devlink_port: devlink port linked to the rate object + * + * Destroy the devlink rate object of type leaf on provided @devlink_port. + */ void devl_rate_leaf_destroy(struct devlink_port *devlink_port) { struct devlink_rate *devlink_rate = devlink_port->devlink_rate; @@ -10038,27 +10031,6 @@ void devl_rate_leaf_destroy(struct devlink_port *devlink_port) EXPORT_SYMBOL_GPL(devl_rate_leaf_destroy); /** - * devlink_rate_leaf_destroy - destroy devlink rate leaf - * - * @devlink_port: devlink port linked to the rate object - * - * Context: Takes and release devlink->lock <mutex>. - */ -void devlink_rate_leaf_destroy(struct devlink_port *devlink_port) -{ - struct devlink_rate *devlink_rate = devlink_port->devlink_rate; - struct devlink *devlink = devlink_port->devlink; - - if (!devlink_rate) - return; - - mutex_lock(&devlink->lock); - devl_rate_leaf_destroy(devlink_port); - mutex_unlock(&devlink->lock); -} -EXPORT_SYMBOL_GPL(devlink_rate_leaf_destroy); - -/** * devl_rate_nodes_destroy - destroy all devlink rate nodes on device * @devlink: devlink instance * |