Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3815,7 +3815,7 @@ static u64 mlxsw_sp_resource_kvd_linear_occ_get(struct devlink *devlink)
	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,
};

+3 −3
Original line number Diff line number Diff line
@@ -408,15 +408,15 @@ static u64 mlxsw_sp_kvdl_large_chunks_occ_get(struct devlink *devlink)
	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,
};

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,
};

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,
};