]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mlxsw: Constify devlink_resource_ops
authorJiri Pirko <jiri@mellanox.com>
Sun, 1 Apr 2018 14:34:52 +0000 (17:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2018 14:56:42 +0000 (10:56 -0400)
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c

index 4aa84442e3573d5f4d85de1527b3d18cef9b4588..0e9ed41ce8bc6b7e5dc59f4e96ccfcdac15a6734 100644 (file)
@@ -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,
 };
 
index 9e61518c49451f6dfa372ffa5ee90844b92530e9..201825c0019b7fde958d7009efe69c74d21c235f 100644 (file)
@@ -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,
 };