mlxsw: make mlxsw_config_profile const
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 11 Aug 2017 13:40:42 +0000 (19:10 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Aug 2017 21:57:04 +0000 (14:57 -0700)
Make these structures const as they only stored in the profile field of
a mlxsw_driver structure, which is of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/switchib.c
drivers/net/ethernet/mellanox/mlxsw/switchx2.c

index a99600333a49940cfbf316a9fddefc61513f6f3c..90a95cdc1626d1f25451f5f03c4fc5a273ac053f 100644 (file)
@@ -3757,7 +3757,7 @@ static void mlxsw_sp_fini(struct mlxsw_core *mlxsw_core)
        mlxsw_sp_fids_fini(mlxsw_sp);
 }
 
-static struct mlxsw_config_profile mlxsw_sp_config_profile = {
+static const struct mlxsw_config_profile mlxsw_sp_config_profile = {
        .used_max_vepa_channels         = 1,
        .max_vepa_channels              = 0,
        .used_max_mid                   = 1,
index 74341fe0eb2594bfe9dbade83b9ac43e66120127..ab7a29846bfa4a84b266bf253f626860644a3378 100644 (file)
@@ -497,7 +497,7 @@ static void mlxsw_sib_fini(struct mlxsw_core *mlxsw_core)
        mlxsw_sib_ports_remove(mlxsw_sib);
 }
 
-static struct mlxsw_config_profile mlxsw_sib_config_profile = {
+static const struct mlxsw_config_profile mlxsw_sib_config_profile = {
        .used_max_system_port           = 1,
        .max_system_port                = 48000,
        .used_max_ib_mc                 = 1,
index 3b0f72455681663514d4725b50ffebe696ada240..f3c29bbf07e22e245492e7d456d89686770061d4 100644 (file)
@@ -1674,7 +1674,7 @@ static void mlxsw_sx_fini(struct mlxsw_core *mlxsw_core)
        mlxsw_sx_ports_remove(mlxsw_sx);
 }
 
-static struct mlxsw_config_profile mlxsw_sx_config_profile = {
+static const struct mlxsw_config_profile mlxsw_sx_config_profile = {
        .used_max_vepa_channels         = 1,
        .max_vepa_channels              = 0,
        .used_max_mid                   = 1,