mirror of https://gitee.com/openkylin/linux.git
mlxsw: Constify devlink_resource_ops
devlink_resource_ops should be const as the arg of register function is also const. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c8276dd250
commit
f9b9120119
|
@ -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)
|
||||||
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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue