Commit f9b91201 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: Constify devlink_resource_ops

devlink_resource_ops should be const as the arg of register function is
also const.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8276dd2
...@@ -3815,7 +3815,7 @@ static u64 mlxsw_sp_resource_kvd_linear_occ_get(struct devlink *devlink) ...@@ -3815,7 +3815,7 @@ static u64 mlxsw_sp_resource_kvd_linear_occ_get(struct devlink *devlink)
return mlxsw_sp_kvdl_occ_get(mlxsw_sp); return mlxsw_sp_kvdl_occ_get(mlxsw_sp);
} }
static struct devlink_resource_ops mlxsw_sp_resource_kvd_linear_ops = { static const struct devlink_resource_ops mlxsw_sp_resource_kvd_linear_ops = {
.occ_get = mlxsw_sp_resource_kvd_linear_occ_get, .occ_get = mlxsw_sp_resource_kvd_linear_occ_get,
}; };
......
...@@ -408,15 +408,15 @@ static u64 mlxsw_sp_kvdl_large_chunks_occ_get(struct devlink *devlink) ...@@ -408,15 +408,15 @@ static u64 mlxsw_sp_kvdl_large_chunks_occ_get(struct devlink *devlink)
return mlxsw_sp_kvdl_part_occ(part); return mlxsw_sp_kvdl_part_occ(part);
} }
static struct devlink_resource_ops mlxsw_sp_kvdl_single_ops = { static const struct devlink_resource_ops mlxsw_sp_kvdl_single_ops = {
.occ_get = mlxsw_sp_kvdl_single_occ_get, .occ_get = mlxsw_sp_kvdl_single_occ_get,
}; };
static struct devlink_resource_ops mlxsw_sp_kvdl_chunks_ops = { static const struct devlink_resource_ops mlxsw_sp_kvdl_chunks_ops = {
.occ_get = mlxsw_sp_kvdl_chunks_occ_get, .occ_get = mlxsw_sp_kvdl_chunks_occ_get,
}; };
static struct devlink_resource_ops mlxsw_sp_kvdl_chunks_large_ops = { static const struct devlink_resource_ops mlxsw_sp_kvdl_chunks_large_ops = {
.occ_get = mlxsw_sp_kvdl_large_chunks_occ_get, .occ_get = mlxsw_sp_kvdl_large_chunks_occ_get,
}; };
......
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