diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-02-18 03:14:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-18 17:30:18 -0500 |
commit | b54452b07a7b1b8cc1385edba3ef2ef6d4679d5a (patch) | |
tree | c8a7271b14c4cd9e0dc22a5d0a3bed9e79c88e36 /net/dcb/dcbnl.c | |
parent | 3ffe533c87281b68d469b279ff3a5056f9c75862 (diff) |
const: struct nla_policy
Make remaining netlink policies as const.
Fixup coding style where needed.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dcb/dcbnl.c')
-rw-r--r-- | net/dcb/dcbnl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index db9f5b39388f..813e399220a7 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c | |||
@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL"); | |||
54 | /**************** DCB attribute policies *************************************/ | 54 | /**************** DCB attribute policies *************************************/ |
55 | 55 | ||
56 | /* DCB netlink attributes policy */ | 56 | /* DCB netlink attributes policy */ |
57 | static struct nla_policy dcbnl_rtnl_policy[DCB_ATTR_MAX + 1] = { | 57 | static const struct nla_policy dcbnl_rtnl_policy[DCB_ATTR_MAX + 1] = { |
58 | [DCB_ATTR_IFNAME] = {.type = NLA_NUL_STRING, .len = IFNAMSIZ - 1}, | 58 | [DCB_ATTR_IFNAME] = {.type = NLA_NUL_STRING, .len = IFNAMSIZ - 1}, |
59 | [DCB_ATTR_STATE] = {.type = NLA_U8}, | 59 | [DCB_ATTR_STATE] = {.type = NLA_U8}, |
60 | [DCB_ATTR_PFC_CFG] = {.type = NLA_NESTED}, | 60 | [DCB_ATTR_PFC_CFG] = {.type = NLA_NESTED}, |
@@ -68,7 +68,7 @@ static struct nla_policy dcbnl_rtnl_policy[DCB_ATTR_MAX + 1] = { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | /* DCB priority flow control to User Priority nested attributes */ | 70 | /* DCB priority flow control to User Priority nested attributes */ |
71 | static struct nla_policy dcbnl_pfc_up_nest[DCB_PFC_UP_ATTR_MAX + 1] = { | 71 | static const struct nla_policy dcbnl_pfc_up_nest[DCB_PFC_UP_ATTR_MAX + 1] = { |
72 | [DCB_PFC_UP_ATTR_0] = {.type = NLA_U8}, | 72 | [DCB_PFC_UP_ATTR_0] = {.type = NLA_U8}, |
73 | [DCB_PFC_UP_ATTR_1] = {.type = NLA_U8}, | 73 | [DCB_PFC_UP_ATTR_1] = {.type = NLA_U8}, |
74 | [DCB_PFC_UP_ATTR_2] = {.type = NLA_U8}, | 74 | [DCB_PFC_UP_ATTR_2] = {.type = NLA_U8}, |
@@ -81,7 +81,7 @@ static struct nla_policy dcbnl_pfc_up_nest[DCB_PFC_UP_ATTR_MAX + 1] = { | |||
81 | }; | 81 | }; |
82 | 82 | ||
83 | /* DCB priority grouping nested attributes */ | 83 | /* DCB priority grouping nested attributes */ |
84 | static struct nla_policy dcbnl_pg_nest[DCB_PG_ATTR_MAX + 1] = { | 84 | static const struct nla_policy dcbnl_pg_nest[DCB_PG_ATTR_MAX + 1] = { |
85 | [DCB_PG_ATTR_TC_0] = {.type = NLA_NESTED}, | 85 | [DCB_PG_ATTR_TC_0] = {.type = NLA_NESTED}, |
86 | [DCB_PG_ATTR_TC_1] = {.type = NLA_NESTED}, | 86 | [DCB_PG_ATTR_TC_1] = {.type = NLA_NESTED}, |
87 | [DCB_PG_ATTR_TC_2] = {.type = NLA_NESTED}, | 87 | [DCB_PG_ATTR_TC_2] = {.type = NLA_NESTED}, |
@@ -103,7 +103,7 @@ static struct nla_policy dcbnl_pg_nest[DCB_PG_ATTR_MAX + 1] = { | |||
103 | }; | 103 | }; |
104 | 104 | ||
105 | /* DCB traffic class nested attributes. */ | 105 | /* DCB traffic class nested attributes. */ |
106 | static struct nla_policy dcbnl_tc_param_nest[DCB_TC_ATTR_PARAM_MAX + 1] = { | 106 | static const struct nla_policy dcbnl_tc_param_nest[DCB_TC_ATTR_PARAM_MAX + 1] = { |
107 | [DCB_TC_ATTR_PARAM_PGID] = {.type = NLA_U8}, | 107 | [DCB_TC_ATTR_PARAM_PGID] = {.type = NLA_U8}, |
108 | [DCB_TC_ATTR_PARAM_UP_MAPPING] = {.type = NLA_U8}, | 108 | [DCB_TC_ATTR_PARAM_UP_MAPPING] = {.type = NLA_U8}, |
109 | [DCB_TC_ATTR_PARAM_STRICT_PRIO] = {.type = NLA_U8}, | 109 | [DCB_TC_ATTR_PARAM_STRICT_PRIO] = {.type = NLA_U8}, |
@@ -112,7 +112,7 @@ static struct nla_policy dcbnl_tc_param_nest[DCB_TC_ATTR_PARAM_MAX + 1] = { | |||
112 | }; | 112 | }; |
113 | 113 | ||
114 | /* DCB capabilities nested attributes. */ | 114 | /* DCB capabilities nested attributes. */ |
115 | static struct nla_policy dcbnl_cap_nest[DCB_CAP_ATTR_MAX + 1] = { | 115 | static const struct nla_policy dcbnl_cap_nest[DCB_CAP_ATTR_MAX + 1] = { |
116 | [DCB_CAP_ATTR_ALL] = {.type = NLA_FLAG}, | 116 | [DCB_CAP_ATTR_ALL] = {.type = NLA_FLAG}, |
117 | [DCB_CAP_ATTR_PG] = {.type = NLA_U8}, | 117 | [DCB_CAP_ATTR_PG] = {.type = NLA_U8}, |
118 | [DCB_CAP_ATTR_PFC] = {.type = NLA_U8}, | 118 | [DCB_CAP_ATTR_PFC] = {.type = NLA_U8}, |
@@ -124,14 +124,14 @@ static struct nla_policy dcbnl_cap_nest[DCB_CAP_ATTR_MAX + 1] = { | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | /* DCB capabilities nested attributes. */ | 126 | /* DCB capabilities nested attributes. */ |
127 | static struct nla_policy dcbnl_numtcs_nest[DCB_NUMTCS_ATTR_MAX + 1] = { | 127 | static const struct nla_policy dcbnl_numtcs_nest[DCB_NUMTCS_ATTR_MAX + 1] = { |
128 | [DCB_NUMTCS_ATTR_ALL] = {.type = NLA_FLAG}, | 128 | [DCB_NUMTCS_ATTR_ALL] = {.type = NLA_FLAG}, |
129 | [DCB_NUMTCS_ATTR_PG] = {.type = NLA_U8}, | 129 | [DCB_NUMTCS_ATTR_PG] = {.type = NLA_U8}, |
130 | [DCB_NUMTCS_ATTR_PFC] = {.type = NLA_U8}, | 130 | [DCB_NUMTCS_ATTR_PFC] = {.type = NLA_U8}, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | /* DCB BCN nested attributes. */ | 133 | /* DCB BCN nested attributes. */ |
134 | static struct nla_policy dcbnl_bcn_nest[DCB_BCN_ATTR_MAX + 1] = { | 134 | static const struct nla_policy dcbnl_bcn_nest[DCB_BCN_ATTR_MAX + 1] = { |
135 | [DCB_BCN_ATTR_RP_0] = {.type = NLA_U8}, | 135 | [DCB_BCN_ATTR_RP_0] = {.type = NLA_U8}, |
136 | [DCB_BCN_ATTR_RP_1] = {.type = NLA_U8}, | 136 | [DCB_BCN_ATTR_RP_1] = {.type = NLA_U8}, |
137 | [DCB_BCN_ATTR_RP_2] = {.type = NLA_U8}, | 137 | [DCB_BCN_ATTR_RP_2] = {.type = NLA_U8}, |
@@ -160,7 +160,7 @@ static struct nla_policy dcbnl_bcn_nest[DCB_BCN_ATTR_MAX + 1] = { | |||
160 | }; | 160 | }; |
161 | 161 | ||
162 | /* DCB APP nested attributes. */ | 162 | /* DCB APP nested attributes. */ |
163 | static struct nla_policy dcbnl_app_nest[DCB_APP_ATTR_MAX + 1] = { | 163 | static const struct nla_policy dcbnl_app_nest[DCB_APP_ATTR_MAX + 1] = { |
164 | [DCB_APP_ATTR_IDTYPE] = {.type = NLA_U8}, | 164 | [DCB_APP_ATTR_IDTYPE] = {.type = NLA_U8}, |
165 | [DCB_APP_ATTR_ID] = {.type = NLA_U16}, | 165 | [DCB_APP_ATTR_ID] = {.type = NLA_U16}, |
166 | [DCB_APP_ATTR_PRIORITY] = {.type = NLA_U8}, | 166 | [DCB_APP_ATTR_PRIORITY] = {.type = NLA_U8}, |