diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 4aa84442e357..0e9ed41ce8bc 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -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, }; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c index 9e61518c4945..201825c0019b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c @@ -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, };