mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
Merge branch 'devlink-const'
Christophe JAILLET says: ==================== devlink: Constify struct devlink_dpipe_table_ops Patch 1 updates devl_dpipe_table_register() and struct devlink_dpipe_table to accept "const struct devlink_dpipe_table_ops". Then patch 2 updates the only user of this function. This is compile tested only. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
fd70f0443e
3 changed files with 7 additions and 7 deletions
|
@ -283,7 +283,7 @@ static u64 mlxsw_sp_dpipe_table_erif_size_get(void *priv)
|
|||
return MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
|
||||
}
|
||||
|
||||
static struct devlink_dpipe_table_ops mlxsw_sp_erif_ops = {
|
||||
static const struct devlink_dpipe_table_ops mlxsw_sp_erif_ops = {
|
||||
.matches_dump = mlxsw_sp_dpipe_table_erif_matches_dump,
|
||||
.actions_dump = mlxsw_sp_dpipe_table_erif_actions_dump,
|
||||
.entries_dump = mlxsw_sp_dpipe_table_erif_entries_dump,
|
||||
|
@ -734,7 +734,7 @@ static u64 mlxsw_sp_dpipe_table_host4_size_get(void *priv)
|
|||
return mlxsw_sp_dpipe_table_host_size_get(mlxsw_sp, AF_INET);
|
||||
}
|
||||
|
||||
static struct devlink_dpipe_table_ops mlxsw_sp_host4_ops = {
|
||||
static const struct devlink_dpipe_table_ops mlxsw_sp_host4_ops = {
|
||||
.matches_dump = mlxsw_sp_dpipe_table_host4_matches_dump,
|
||||
.actions_dump = mlxsw_sp_dpipe_table_host_actions_dump,
|
||||
.entries_dump = mlxsw_sp_dpipe_table_host4_entries_dump,
|
||||
|
@ -811,7 +811,7 @@ static u64 mlxsw_sp_dpipe_table_host6_size_get(void *priv)
|
|||
return mlxsw_sp_dpipe_table_host_size_get(mlxsw_sp, AF_INET6);
|
||||
}
|
||||
|
||||
static struct devlink_dpipe_table_ops mlxsw_sp_host6_ops = {
|
||||
static const struct devlink_dpipe_table_ops mlxsw_sp_host6_ops = {
|
||||
.matches_dump = mlxsw_sp_dpipe_table_host6_matches_dump,
|
||||
.actions_dump = mlxsw_sp_dpipe_table_host_actions_dump,
|
||||
.entries_dump = mlxsw_sp_dpipe_table_host6_entries_dump,
|
||||
|
@ -1230,7 +1230,7 @@ mlxsw_sp_dpipe_table_adj_size_get(void *priv)
|
|||
return size;
|
||||
}
|
||||
|
||||
static struct devlink_dpipe_table_ops mlxsw_sp_dpipe_table_adj_ops = {
|
||||
static const struct devlink_dpipe_table_ops mlxsw_sp_dpipe_table_adj_ops = {
|
||||
.matches_dump = mlxsw_sp_dpipe_table_adj_matches_dump,
|
||||
.actions_dump = mlxsw_sp_dpipe_table_adj_actions_dump,
|
||||
.entries_dump = mlxsw_sp_dpipe_table_adj_entries_dump,
|
||||
|
|
|
@ -352,7 +352,7 @@ struct devlink_dpipe_table {
|
|||
bool resource_valid;
|
||||
u64 resource_id;
|
||||
u64 resource_units;
|
||||
struct devlink_dpipe_table_ops *table_ops;
|
||||
const struct devlink_dpipe_table_ops *table_ops;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
|
@ -1751,7 +1751,7 @@ void devl_sb_unregister(struct devlink *devlink, unsigned int sb_index);
|
|||
void devlink_sb_unregister(struct devlink *devlink, unsigned int sb_index);
|
||||
int devl_dpipe_table_register(struct devlink *devlink,
|
||||
const char *table_name,
|
||||
struct devlink_dpipe_table_ops *table_ops,
|
||||
const struct devlink_dpipe_table_ops *table_ops,
|
||||
void *priv, bool counter_control_extern);
|
||||
void devl_dpipe_table_unregister(struct devlink *devlink,
|
||||
const char *table_name);
|
||||
|
|
|
@ -839,7 +839,7 @@ EXPORT_SYMBOL_GPL(devlink_dpipe_table_counter_enabled);
|
|||
*/
|
||||
int devl_dpipe_table_register(struct devlink *devlink,
|
||||
const char *table_name,
|
||||
struct devlink_dpipe_table_ops *table_ops,
|
||||
const struct devlink_dpipe_table_ops *table_ops,
|
||||
void *priv, bool counter_control_extern)
|
||||
{
|
||||
struct devlink_dpipe_table *table;
|
||||
|
|
Loading…
Add table
Reference in a new issue