devlink: Remove unused function devlink_rate_nodes_destroy
authorMoshe Shemesh <moshe@nvidia.com>
Mon, 11 Jul 2022 08:14:02 +0000 (01:14 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Jul 2022 08:26:22 +0000 (10:26 +0200)
The previous patch removed the last usage of the function
devlink_rate_nodes_destroy(). Thus, remove this 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>
include/net/devlink.h
net/core/devlink.c

index 2a2a2a0..0e163cc 100644 (file)
@@ -1571,7 +1571,6 @@ void devlink_port_attrs_pci_sf_set(struct devlink_port *devlink_port,
                                   bool external);
 int devlink_rate_leaf_create(struct devlink_port *port, void *priv);
 void devlink_rate_leaf_destroy(struct devlink_port *devlink_port);
-void devlink_rate_nodes_destroy(struct devlink *devlink);
 void devlink_port_linecard_set(struct devlink_port *devlink_port,
                               struct devlink_linecard *linecard);
 struct devlink_linecard *
index db61f3a..1588e22 100644 (file)
@@ -10096,24 +10096,6 @@ void devl_rate_nodes_destroy(struct devlink *devlink)
 EXPORT_SYMBOL_GPL(devl_rate_nodes_destroy);
 
 /**
- * devlink_rate_nodes_destroy - destroy all devlink rate nodes on device
- *
- * @devlink: devlink instance
- *
- * Unset parent for all rate objects and destroy all rate nodes
- * on specified device.
- *
- * Context: Takes and release devlink->lock <mutex>.
- */
-void devlink_rate_nodes_destroy(struct devlink *devlink)
-{
-       mutex_lock(&devlink->lock);
-       devl_rate_nodes_destroy(devlink);
-       mutex_unlock(&devlink->lock);
-}
-EXPORT_SYMBOL_GPL(devlink_rate_nodes_destroy);
-
-/**
  *     devlink_port_linecard_set - Link port with a linecard
  *
  *     @devlink_port: devlink port