提交 f9b91201 编写于 作者: J Jiri Pirko 提交者: 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: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册