Commit f655dacb authored by Jiri Pirko's avatar Jiri Pirko Committed by Jakub Kicinski

net: devlink: remove unused locked functions

Remove locked versions of functions that are no longer used by anyone.
Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 012ec02a
...@@ -1594,20 +1594,11 @@ int devl_dpipe_table_register(struct devlink *devlink, ...@@ -1594,20 +1594,11 @@ int devl_dpipe_table_register(struct devlink *devlink,
const char *table_name, const char *table_name,
struct devlink_dpipe_table_ops *table_ops, struct devlink_dpipe_table_ops *table_ops,
void *priv, bool counter_control_extern); void *priv, bool counter_control_extern);
int devlink_dpipe_table_register(struct devlink *devlink,
const char *table_name,
struct devlink_dpipe_table_ops *table_ops,
void *priv, bool counter_control_extern);
void devl_dpipe_table_unregister(struct devlink *devlink, void devl_dpipe_table_unregister(struct devlink *devlink,
const char *table_name); const char *table_name);
void devlink_dpipe_table_unregister(struct devlink *devlink,
const char *table_name);
void devl_dpipe_headers_register(struct devlink *devlink, void devl_dpipe_headers_register(struct devlink *devlink,
struct devlink_dpipe_headers *dpipe_headers); struct devlink_dpipe_headers *dpipe_headers);
void devlink_dpipe_headers_register(struct devlink *devlink,
struct devlink_dpipe_headers *dpipe_headers);
void devl_dpipe_headers_unregister(struct devlink *devlink); void devl_dpipe_headers_unregister(struct devlink *devlink);
void devlink_dpipe_headers_unregister(struct devlink *devlink);
bool devlink_dpipe_table_counter_enabled(struct devlink *devlink, bool devlink_dpipe_table_counter_enabled(struct devlink *devlink,
const char *table_name); const char *table_name);
int devlink_dpipe_entry_ctx_prepare(struct devlink_dpipe_dump_ctx *dump_ctx); int devlink_dpipe_entry_ctx_prepare(struct devlink_dpipe_dump_ctx *dump_ctx);
...@@ -1640,9 +1631,6 @@ void devlink_resources_unregister(struct devlink *devlink); ...@@ -1640,9 +1631,6 @@ void devlink_resources_unregister(struct devlink *devlink);
int devl_resource_size_get(struct devlink *devlink, int devl_resource_size_get(struct devlink *devlink,
u64 resource_id, u64 resource_id,
u64 *p_resource_size); u64 *p_resource_size);
int devlink_resource_size_get(struct devlink *devlink,
u64 resource_id,
u64 *p_resource_size);
int devl_dpipe_table_resource_set(struct devlink *devlink, int devl_dpipe_table_resource_set(struct devlink *devlink,
const char *table_name, u64 resource_id, const char *table_name, u64 resource_id,
u64 resource_units); u64 resource_units);
...@@ -1817,18 +1805,10 @@ int ...@@ -1817,18 +1805,10 @@ int
devl_trap_policers_register(struct devlink *devlink, devl_trap_policers_register(struct devlink *devlink,
const struct devlink_trap_policer *policers, const struct devlink_trap_policer *policers,
size_t policers_count); size_t policers_count);
int
devlink_trap_policers_register(struct devlink *devlink,
const struct devlink_trap_policer *policers,
size_t policers_count);
void void
devl_trap_policers_unregister(struct devlink *devlink, devl_trap_policers_unregister(struct devlink *devlink,
const struct devlink_trap_policer *policers, const struct devlink_trap_policer *policers,
size_t policers_count); size_t policers_count);
void
devlink_trap_policers_unregister(struct devlink *devlink,
const struct devlink_trap_policer *policers,
size_t policers_count);
#if IS_ENABLED(CONFIG_NET_DEVLINK) #if IS_ENABLED(CONFIG_NET_DEVLINK)
......
...@@ -10461,25 +10461,6 @@ void devl_dpipe_headers_register(struct devlink *devlink, ...@@ -10461,25 +10461,6 @@ void devl_dpipe_headers_register(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_dpipe_headers_register); EXPORT_SYMBOL_GPL(devl_dpipe_headers_register);
/**
* devlink_dpipe_headers_register - register dpipe headers
*
* @devlink: devlink
* @dpipe_headers: dpipe header array
*
* Register the headers supported by hardware.
*
* Context: Takes and release devlink->lock <mutex>.
*/
void devlink_dpipe_headers_register(struct devlink *devlink,
struct devlink_dpipe_headers *dpipe_headers)
{
devl_lock(devlink);
devl_dpipe_headers_register(devlink, dpipe_headers);
devl_unlock(devlink);
}
EXPORT_SYMBOL_GPL(devlink_dpipe_headers_register);
/** /**
* devl_dpipe_headers_unregister - unregister dpipe headers * devl_dpipe_headers_unregister - unregister dpipe headers
* *
...@@ -10495,23 +10476,6 @@ void devl_dpipe_headers_unregister(struct devlink *devlink) ...@@ -10495,23 +10476,6 @@ void devl_dpipe_headers_unregister(struct devlink *devlink)
} }
EXPORT_SYMBOL_GPL(devl_dpipe_headers_unregister); EXPORT_SYMBOL_GPL(devl_dpipe_headers_unregister);
/**
* devlink_dpipe_headers_unregister - unregister dpipe headers
*
* @devlink: devlink
*
* Unregister the headers supported by hardware.
*
* Context: Takes and release devlink->lock <mutex>.
*/
void devlink_dpipe_headers_unregister(struct devlink *devlink)
{
devl_lock(devlink);
devl_dpipe_headers_unregister(devlink);
devl_unlock(devlink);
}
EXPORT_SYMBOL_GPL(devlink_dpipe_headers_unregister);
/** /**
* devlink_dpipe_table_counter_enabled - check if counter allocation * devlink_dpipe_table_counter_enabled - check if counter allocation
* required * required
...@@ -10583,32 +10547,6 @@ int devl_dpipe_table_register(struct devlink *devlink, ...@@ -10583,32 +10547,6 @@ int devl_dpipe_table_register(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_dpipe_table_register); EXPORT_SYMBOL_GPL(devl_dpipe_table_register);
/**
* devlink_dpipe_table_register - register dpipe table
*
* @devlink: devlink
* @table_name: table name
* @table_ops: table ops
* @priv: priv
* @counter_control_extern: external control for counters
*
* Context: Takes and release devlink->lock <mutex>.
*/
int devlink_dpipe_table_register(struct devlink *devlink,
const char *table_name,
struct devlink_dpipe_table_ops *table_ops,
void *priv, bool counter_control_extern)
{
int err;
devl_lock(devlink);
err = devl_dpipe_table_register(devlink, table_name, table_ops, priv,
counter_control_extern);
devl_unlock(devlink);
return err;
}
EXPORT_SYMBOL_GPL(devlink_dpipe_table_register);
/** /**
* devl_dpipe_table_unregister - unregister dpipe table * devl_dpipe_table_unregister - unregister dpipe table
* *
...@@ -10631,23 +10569,6 @@ void devl_dpipe_table_unregister(struct devlink *devlink, ...@@ -10631,23 +10569,6 @@ void devl_dpipe_table_unregister(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_dpipe_table_unregister); EXPORT_SYMBOL_GPL(devl_dpipe_table_unregister);
/**
* devlink_dpipe_table_unregister - unregister dpipe table
*
* @devlink: devlink
* @table_name: table name
*
* Context: Takes and release devlink->lock <mutex>.
*/
void devlink_dpipe_table_unregister(struct devlink *devlink,
const char *table_name)
{
devl_lock(devlink);
devl_dpipe_table_unregister(devlink, table_name);
devl_unlock(devlink);
}
EXPORT_SYMBOL_GPL(devlink_dpipe_table_unregister);
/** /**
* devl_resource_register - devlink resource register * devl_resource_register - devlink resource register
* *
...@@ -10820,28 +10741,6 @@ int devl_resource_size_get(struct devlink *devlink, ...@@ -10820,28 +10741,6 @@ int devl_resource_size_get(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_resource_size_get); EXPORT_SYMBOL_GPL(devl_resource_size_get);
/**
* devlink_resource_size_get - get and update size
*
* @devlink: devlink
* @resource_id: the requested resource id
* @p_resource_size: ptr to update
*
* Context: Takes and release devlink->lock <mutex>.
*/
int devlink_resource_size_get(struct devlink *devlink,
u64 resource_id,
u64 *p_resource_size)
{
int err;
devl_lock(devlink);
err = devl_resource_size_get(devlink, resource_id, p_resource_size);
devl_unlock(devlink);
return err;
}
EXPORT_SYMBOL_GPL(devlink_resource_size_get);
/** /**
* devl_dpipe_table_resource_set - set the resource id * devl_dpipe_table_resource_set - set the resource id
* *
...@@ -10868,30 +10767,6 @@ int devl_dpipe_table_resource_set(struct devlink *devlink, ...@@ -10868,30 +10767,6 @@ int devl_dpipe_table_resource_set(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_dpipe_table_resource_set); EXPORT_SYMBOL_GPL(devl_dpipe_table_resource_set);
/**
* devlink_dpipe_table_resource_set - set the resource id
*
* @devlink: devlink
* @table_name: table name
* @resource_id: resource id
* @resource_units: number of resource's units consumed per table's entry
*
* Context: Takes and release devlink->lock <mutex>.
*/
int devlink_dpipe_table_resource_set(struct devlink *devlink,
const char *table_name, u64 resource_id,
u64 resource_units)
{
int err;
devl_lock(devlink);
err = devl_dpipe_table_resource_set(devlink, table_name,
resource_id, resource_units);
devl_unlock(devlink);
return err;
}
EXPORT_SYMBOL_GPL(devlink_dpipe_table_resource_set);
/** /**
* devl_resource_occ_get_register - register occupancy getter * devl_resource_occ_get_register - register occupancy getter
* *
...@@ -12262,30 +12137,6 @@ devl_trap_policers_register(struct devlink *devlink, ...@@ -12262,30 +12137,6 @@ devl_trap_policers_register(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_trap_policers_register); EXPORT_SYMBOL_GPL(devl_trap_policers_register);
/**
* devlink_trap_policers_register - Register packet trap policers with devlink.
* @devlink: devlink.
* @policers: Packet trap policers.
* @policers_count: Count of provided packet trap policers.
*
* Return: Non-zero value on failure.
*
* Context: Takes and release devlink->lock <mutex>.
*/
int
devlink_trap_policers_register(struct devlink *devlink,
const struct devlink_trap_policer *policers,
size_t policers_count)
{
int err;
devl_lock(devlink);
err = devl_trap_policers_register(devlink, policers, policers_count);
devl_unlock(devlink);
return err;
}
EXPORT_SYMBOL_GPL(devlink_trap_policers_register);
/** /**
* devl_trap_policers_unregister - Unregister packet trap policers from devlink. * devl_trap_policers_unregister - Unregister packet trap policers from devlink.
* @devlink: devlink. * @devlink: devlink.
...@@ -12305,25 +12156,6 @@ devl_trap_policers_unregister(struct devlink *devlink, ...@@ -12305,25 +12156,6 @@ devl_trap_policers_unregister(struct devlink *devlink,
} }
EXPORT_SYMBOL_GPL(devl_trap_policers_unregister); EXPORT_SYMBOL_GPL(devl_trap_policers_unregister);
/**
* devlink_trap_policers_unregister - Unregister packet trap policers from devlink.
* @devlink: devlink.
* @policers: Packet trap policers.
* @policers_count: Count of provided packet trap policers.
*
* Context: Takes and release devlink->lock <mutex>.
*/
void
devlink_trap_policers_unregister(struct devlink *devlink,
const struct devlink_trap_policer *policers,
size_t policers_count)
{
devl_lock(devlink);
devl_trap_policers_unregister(devlink, policers, policers_count);
devl_unlock(devlink);
}
EXPORT_SYMBOL_GPL(devlink_trap_policers_unregister);
static void __devlink_compat_running_version(struct devlink *devlink, static void __devlink_compat_running_version(struct devlink *devlink,
char *buf, size_t len) char *buf, size_t len)
{ {
......
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