diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-09-01 07:13:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-01 20:40:57 -0400 |
commit | 89d69d2b75a8f7e258f4b634cd985374cfd3202e (patch) | |
tree | 2f01d6ae1844c92ef09160ad1966edee34ee2d8a /net | |
parent | dcbfef820bdd1cdb412ccf234840e23edf67014f (diff) |
net: make neigh_ops constant
These tables are never modified at runtime. Move to read-only
section.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/clip.c | 2 | ||||
-rw-r--r-- | net/decnet/dn_neigh.c | 6 | ||||
-rw-r--r-- | net/ipv4/arp.c | 8 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index 27f6852ce190..64629c354343 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -267,7 +267,7 @@ static void clip_neigh_error(struct neighbour *neigh, struct sk_buff *skb) | |||
267 | kfree_skb(skb); | 267 | kfree_skb(skb); |
268 | } | 268 | } |
269 | 269 | ||
270 | static struct neigh_ops clip_neigh_ops = { | 270 | static const struct neigh_ops clip_neigh_ops = { |
271 | .family = AF_INET, | 271 | .family = AF_INET, |
272 | .solicit = clip_neigh_solicit, | 272 | .solicit = clip_neigh_solicit, |
273 | .error_report = clip_neigh_error, | 273 | .error_report = clip_neigh_error, |
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 923786bd6d01..794b5bf95af1 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -59,7 +59,7 @@ static int dn_phase3_output(struct sk_buff *); | |||
59 | /* | 59 | /* |
60 | * For talking to broadcast devices: Ethernet & PPP | 60 | * For talking to broadcast devices: Ethernet & PPP |
61 | */ | 61 | */ |
62 | static struct neigh_ops dn_long_ops = { | 62 | static const struct neigh_ops dn_long_ops = { |
63 | .family = AF_DECnet, | 63 | .family = AF_DECnet, |
64 | .error_report = dn_long_error_report, | 64 | .error_report = dn_long_error_report, |
65 | .output = dn_long_output, | 65 | .output = dn_long_output, |
@@ -71,7 +71,7 @@ static struct neigh_ops dn_long_ops = { | |||
71 | /* | 71 | /* |
72 | * For talking to pointopoint and multidrop devices: DDCMP and X.25 | 72 | * For talking to pointopoint and multidrop devices: DDCMP and X.25 |
73 | */ | 73 | */ |
74 | static struct neigh_ops dn_short_ops = { | 74 | static const struct neigh_ops dn_short_ops = { |
75 | .family = AF_DECnet, | 75 | .family = AF_DECnet, |
76 | .error_report = dn_short_error_report, | 76 | .error_report = dn_short_error_report, |
77 | .output = dn_short_output, | 77 | .output = dn_short_output, |
@@ -83,7 +83,7 @@ static struct neigh_ops dn_short_ops = { | |||
83 | /* | 83 | /* |
84 | * For talking to DECnet phase III nodes | 84 | * For talking to DECnet phase III nodes |
85 | */ | 85 | */ |
86 | static struct neigh_ops dn_phase3_ops = { | 86 | static const struct neigh_ops dn_phase3_ops = { |
87 | .family = AF_DECnet, | 87 | .family = AF_DECnet, |
88 | .error_report = dn_short_error_report, /* Can use short version here */ | 88 | .error_report = dn_short_error_report, /* Can use short version here */ |
89 | .output = dn_phase3_output, | 89 | .output = dn_phase3_output, |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 090e9991ac2a..4e80f336c0cf 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -130,7 +130,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb); | |||
130 | static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb); | 130 | static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb); |
131 | static void parp_redo(struct sk_buff *skb); | 131 | static void parp_redo(struct sk_buff *skb); |
132 | 132 | ||
133 | static struct neigh_ops arp_generic_ops = { | 133 | static const struct neigh_ops arp_generic_ops = { |
134 | .family = AF_INET, | 134 | .family = AF_INET, |
135 | .solicit = arp_solicit, | 135 | .solicit = arp_solicit, |
136 | .error_report = arp_error_report, | 136 | .error_report = arp_error_report, |
@@ -140,7 +140,7 @@ static struct neigh_ops arp_generic_ops = { | |||
140 | .queue_xmit = dev_queue_xmit, | 140 | .queue_xmit = dev_queue_xmit, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | static struct neigh_ops arp_hh_ops = { | 143 | static const struct neigh_ops arp_hh_ops = { |
144 | .family = AF_INET, | 144 | .family = AF_INET, |
145 | .solicit = arp_solicit, | 145 | .solicit = arp_solicit, |
146 | .error_report = arp_error_report, | 146 | .error_report = arp_error_report, |
@@ -150,7 +150,7 @@ static struct neigh_ops arp_hh_ops = { | |||
150 | .queue_xmit = dev_queue_xmit, | 150 | .queue_xmit = dev_queue_xmit, |
151 | }; | 151 | }; |
152 | 152 | ||
153 | static struct neigh_ops arp_direct_ops = { | 153 | static const struct neigh_ops arp_direct_ops = { |
154 | .family = AF_INET, | 154 | .family = AF_INET, |
155 | .output = dev_queue_xmit, | 155 | .output = dev_queue_xmit, |
156 | .connected_output = dev_queue_xmit, | 156 | .connected_output = dev_queue_xmit, |
@@ -158,7 +158,7 @@ static struct neigh_ops arp_direct_ops = { | |||
158 | .queue_xmit = dev_queue_xmit, | 158 | .queue_xmit = dev_queue_xmit, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | struct neigh_ops arp_broken_ops = { | 161 | const struct neigh_ops arp_broken_ops = { |
162 | .family = AF_INET, | 162 | .family = AF_INET, |
163 | .solicit = arp_solicit, | 163 | .solicit = arp_solicit, |
164 | .error_report = arp_error_report, | 164 | .error_report = arp_error_report, |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 44b4c87e5cce..7015478797f6 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -98,7 +98,7 @@ static int pndisc_constructor(struct pneigh_entry *n); | |||
98 | static void pndisc_destructor(struct pneigh_entry *n); | 98 | static void pndisc_destructor(struct pneigh_entry *n); |
99 | static void pndisc_redo(struct sk_buff *skb); | 99 | static void pndisc_redo(struct sk_buff *skb); |
100 | 100 | ||
101 | static struct neigh_ops ndisc_generic_ops = { | 101 | static const struct neigh_ops ndisc_generic_ops = { |
102 | .family = AF_INET6, | 102 | .family = AF_INET6, |
103 | .solicit = ndisc_solicit, | 103 | .solicit = ndisc_solicit, |
104 | .error_report = ndisc_error_report, | 104 | .error_report = ndisc_error_report, |
@@ -108,7 +108,7 @@ static struct neigh_ops ndisc_generic_ops = { | |||
108 | .queue_xmit = dev_queue_xmit, | 108 | .queue_xmit = dev_queue_xmit, |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static struct neigh_ops ndisc_hh_ops = { | 111 | static const struct neigh_ops ndisc_hh_ops = { |
112 | .family = AF_INET6, | 112 | .family = AF_INET6, |
113 | .solicit = ndisc_solicit, | 113 | .solicit = ndisc_solicit, |
114 | .error_report = ndisc_error_report, | 114 | .error_report = ndisc_error_report, |
@@ -119,7 +119,7 @@ static struct neigh_ops ndisc_hh_ops = { | |||
119 | }; | 119 | }; |
120 | 120 | ||
121 | 121 | ||
122 | static struct neigh_ops ndisc_direct_ops = { | 122 | static const struct neigh_ops ndisc_direct_ops = { |
123 | .family = AF_INET6, | 123 | .family = AF_INET6, |
124 | .output = dev_queue_xmit, | 124 | .output = dev_queue_xmit, |
125 | .connected_output = dev_queue_xmit, | 125 | .connected_output = dev_queue_xmit, |