diff options
author | Arjan van de Ven <arjan@infradead.org> | 2005-11-29 19:21:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-29 19:21:38 -0500 |
commit | 9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb (patch) | |
tree | 80517910c731fc48512ba9c31aa823575db405b3 /net/ipv6 | |
parent | fb29644994744a63bc57186cefa79534b5d9b5a9 (diff) |
[NET]: Add const markers to various variables.
the patch below marks various variables const in net/; the goal is to
move them to the .rodata section so that they can't false-share
cachelines with things that get written to, as well as potentially
helping gcc a bit with optimisations. (these were found using a gcc
patch to warn about such variables)
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/icmp.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 1bdf0fb8bf8a..34a332225c17 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -751,7 +751,7 @@ void icmpv6_cleanup(void) | |||
751 | inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6); | 751 | inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6); |
752 | } | 752 | } |
753 | 753 | ||
754 | static struct icmp6_err { | 754 | static const struct icmp6_err { |
755 | int err; | 755 | int err; |
756 | int fatal; | 756 | int fatal; |
757 | } tab_unreach[] = { | 757 | } tab_unreach[] = { |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 7d492226c16e..95d469271c4d 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -1972,7 +1972,7 @@ static int ip6t_get_matches(char *buffer, char **start, off_t offset, int length | |||
1972 | return pos; | 1972 | return pos; |
1973 | } | 1973 | } |
1974 | 1974 | ||
1975 | static struct { char *name; get_info_t *get_info; } ip6t_proc_entry[] = | 1975 | static const struct { char *name; get_info_t *get_info; } ip6t_proc_entry[] = |
1976 | { { "ip6_tables_names", ip6t_get_tables }, | 1976 | { { "ip6_tables_names", ip6t_get_tables }, |
1977 | { "ip6_tables_targets", ip6t_get_targets }, | 1977 | { "ip6_tables_targets", ip6t_get_targets }, |
1978 | { "ip6_tables_matches", ip6t_get_matches }, | 1978 | { "ip6_tables_matches", ip6t_get_matches }, |