diff options
author | Jiri Pirko <jiri@mellanox.com> | 2018-04-01 17:34:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-01 17:56:42 +0300 |
commit | f9b9120119ca70ccdb1c900ac061425e4784c4de (patch) | |
tree | 53a63b23dc885af79ee9c82a2f0dd681a2b500c5 | |
parent | c8276dd250e9a9833f8ff1da1cd53e6f7e6825e2 (diff) | |
download | linux-f9b9120119ca70ccdb1c900ac061425e4784c4de.tar.xz |
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 6 |
2 files changed, 4 insertions, 4 deletions
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, }; |