diff options
author | Patrick McHardy <kaber@trash.net> | 2007-06-05 15:38:30 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-06-07 16:40:10 -0400 |
commit | ef7c79ed645f52bcbdd88f8d54a9702c4d3fd15d (patch) | |
tree | 4c27ec3362d958b99672366437d5eb6038dd561d /net/netlink | |
parent | 14a49e1fd2bb91ba2bf0e1f06711b6dbc21de02d (diff) |
[NETLINK]: Mark netlink policies const
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/attr.c | 8 | ||||
-rw-r--r-- | net/netlink/genetlink.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/netlink/attr.c b/net/netlink/attr.c index df5f820a4c32..c591212793ee 100644 --- a/net/netlink/attr.c +++ b/net/netlink/attr.c | |||
@@ -24,9 +24,9 @@ static u16 nla_attr_minlen[NLA_TYPE_MAX+1] __read_mostly = { | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | static int validate_nla(struct nlattr *nla, int maxtype, | 26 | static int validate_nla(struct nlattr *nla, int maxtype, |
27 | struct nla_policy *policy) | 27 | const struct nla_policy *policy) |
28 | { | 28 | { |
29 | struct nla_policy *pt; | 29 | const struct nla_policy *pt; |
30 | int minlen = 0, attrlen = nla_len(nla); | 30 | int minlen = 0, attrlen = nla_len(nla); |
31 | 31 | ||
32 | if (nla->nla_type <= 0 || nla->nla_type > maxtype) | 32 | if (nla->nla_type <= 0 || nla->nla_type > maxtype) |
@@ -99,7 +99,7 @@ static int validate_nla(struct nlattr *nla, int maxtype, | |||
99 | * Returns 0 on success or a negative error code. | 99 | * Returns 0 on success or a negative error code. |
100 | */ | 100 | */ |
101 | int nla_validate(struct nlattr *head, int len, int maxtype, | 101 | int nla_validate(struct nlattr *head, int len, int maxtype, |
102 | struct nla_policy *policy) | 102 | const struct nla_policy *policy) |
103 | { | 103 | { |
104 | struct nlattr *nla; | 104 | struct nlattr *nla; |
105 | int rem, err; | 105 | int rem, err; |
@@ -130,7 +130,7 @@ errout: | |||
130 | * Returns 0 on success or a negative error code. | 130 | * Returns 0 on success or a negative error code. |
131 | */ | 131 | */ |
132 | int nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len, | 132 | int nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len, |
133 | struct nla_policy *policy) | 133 | const struct nla_policy *policy) |
134 | { | 134 | { |
135 | struct nlattr *nla; | 135 | struct nlattr *nla; |
136 | int rem, err; | 136 | int rem, err; |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 6e31234a4196..b9ab62f938d0 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -472,7 +472,7 @@ static struct sk_buff *ctrl_build_msg(struct genl_family *family, u32 pid, | |||
472 | return skb; | 472 | return skb; |
473 | } | 473 | } |
474 | 474 | ||
475 | static struct nla_policy ctrl_policy[CTRL_ATTR_MAX+1] __read_mostly = { | 475 | static const struct nla_policy ctrl_policy[CTRL_ATTR_MAX+1] = { |
476 | [CTRL_ATTR_FAMILY_ID] = { .type = NLA_U16 }, | 476 | [CTRL_ATTR_FAMILY_ID] = { .type = NLA_U16 }, |
477 | [CTRL_ATTR_FAMILY_NAME] = { .type = NLA_NUL_STRING, | 477 | [CTRL_ATTR_FAMILY_NAME] = { .type = NLA_NUL_STRING, |
478 | .len = GENL_NAMSIZ - 1 }, | 478 | .len = GENL_NAMSIZ - 1 }, |