aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2009-11-05 16:32:03 -0500
committerEric W. Biederman <ebiederm@xmission.com>2009-11-12 05:05:06 -0500
commitf8572d8f2a2ba75408b97dc24ef47c83671795d7 (patch)
tree052506a457939fea00d138d3a982d778df34e14c /net/ax25
parent86b1bc68e2f4244e4ea5db5458df9d19259fbb30 (diff)
sysctl net: Remove unused binary sysctl code
Now that sys_sysctl is a compatiblity wrapper around /proc/sys all sysctl strategy routines, and all ctl_name and strategy entries in the sysctl tables are unused, and can be revmoed. In addition neigh_sysctl_register has been modified to no longer take a strategy argument and it's callers have been modified not to pass one. Cc: "David Miller" <davem@davemloft.net> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: netdev@vger.kernel.org Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'net/ax25')
-rw-r--r--net/ax25/sysctl_net_ax25.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index 62ee3fb34732..5159be6b2625 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -34,156 +34,128 @@ static ctl_table *ax25_table;
34static int ax25_table_size; 34static int ax25_table_size;
35 35
36static struct ctl_path ax25_path[] = { 36static struct ctl_path ax25_path[] = {
37 { .procname = "net", .ctl_name = CTL_NET, }, 37 { .procname = "net", },
38 { .procname = "ax25", .ctl_name = NET_AX25, }, 38 { .procname = "ax25", },
39 { } 39 { }
40}; 40};
41 41
42static const ctl_table ax25_param_table[] = { 42static const ctl_table ax25_param_table[] = {
43 { 43 {
44 .ctl_name = NET_AX25_IP_DEFAULT_MODE,
45 .procname = "ip_default_mode", 44 .procname = "ip_default_mode",
46 .maxlen = sizeof(int), 45 .maxlen = sizeof(int),
47 .mode = 0644, 46 .mode = 0644,
48 .proc_handler = proc_dointvec_minmax, 47 .proc_handler = proc_dointvec_minmax,
49 .strategy = sysctl_intvec,
50 .extra1 = &min_ipdefmode, 48 .extra1 = &min_ipdefmode,
51 .extra2 = &max_ipdefmode 49 .extra2 = &max_ipdefmode
52 }, 50 },
53 { 51 {
54 .ctl_name = NET_AX25_DEFAULT_MODE,
55 .procname = "ax25_default_mode", 52 .procname = "ax25_default_mode",
56 .maxlen = sizeof(int), 53 .maxlen = sizeof(int),
57 .mode = 0644, 54 .mode = 0644,
58 .proc_handler = proc_dointvec_minmax, 55 .proc_handler = proc_dointvec_minmax,
59 .strategy = sysctl_intvec,
60 .extra1 = &min_axdefmode, 56 .extra1 = &min_axdefmode,
61 .extra2 = &max_axdefmode 57 .extra2 = &max_axdefmode
62 }, 58 },
63 { 59 {
64 .ctl_name = NET_AX25_BACKOFF_TYPE,
65 .procname = "backoff_type", 60 .procname = "backoff_type",
66 .maxlen = sizeof(int), 61 .maxlen = sizeof(int),
67 .mode = 0644, 62 .mode = 0644,
68 .proc_handler = proc_dointvec_minmax, 63 .proc_handler = proc_dointvec_minmax,
69 .strategy = sysctl_intvec,
70 .extra1 = &min_backoff, 64 .extra1 = &min_backoff,
71 .extra2 = &max_backoff 65 .extra2 = &max_backoff
72 }, 66 },
73 { 67 {
74 .ctl_name = NET_AX25_CONNECT_MODE,
75 .procname = "connect_mode", 68 .procname = "connect_mode",
76 .maxlen = sizeof(int), 69 .maxlen = sizeof(int),
77 .mode = 0644, 70 .mode = 0644,
78 .proc_handler = proc_dointvec_minmax, 71 .proc_handler = proc_dointvec_minmax,
79 .strategy = sysctl_intvec,
80 .extra1 = &min_conmode, 72 .extra1 = &min_conmode,
81 .extra2 = &max_conmode 73 .extra2 = &max_conmode
82 }, 74 },
83 { 75 {
84 .ctl_name = NET_AX25_STANDARD_WINDOW,
85 .procname = "standard_window_size", 76 .procname = "standard_window_size",
86 .maxlen = sizeof(int), 77 .maxlen = sizeof(int),
87 .mode = 0644, 78 .mode = 0644,
88 .proc_handler = proc_dointvec_minmax, 79 .proc_handler = proc_dointvec_minmax,
89 .strategy = sysctl_intvec,
90 .extra1 = &min_window, 80 .extra1 = &min_window,
91 .extra2 = &max_window 81 .extra2 = &max_window
92 }, 82 },
93 { 83 {
94 .ctl_name = NET_AX25_EXTENDED_WINDOW,
95 .procname = "extended_window_size", 84 .procname = "extended_window_size",
96 .maxlen = sizeof(int), 85 .maxlen = sizeof(int),
97 .mode = 0644, 86 .mode = 0644,
98 .proc_handler = proc_dointvec_minmax, 87 .proc_handler = proc_dointvec_minmax,
99 .strategy = sysctl_intvec,
100 .extra1 = &min_ewindow, 88 .extra1 = &min_ewindow,
101 .extra2 = &max_ewindow 89 .extra2 = &max_ewindow
102 }, 90 },
103 { 91 {
104 .ctl_name = NET_AX25_T1_TIMEOUT,
105 .procname = "t1_timeout", 92 .procname = "t1_timeout",
106 .maxlen = sizeof(int), 93 .maxlen = sizeof(int),
107 .mode = 0644, 94 .mode = 0644,
108 .proc_handler = proc_dointvec_minmax, 95 .proc_handler = proc_dointvec_minmax,
109 .strategy = sysctl_intvec,
110 .extra1 = &min_t1, 96 .extra1 = &min_t1,
111 .extra2 = &max_t1 97 .extra2 = &max_t1
112 }, 98 },
113 { 99 {
114 .ctl_name = NET_AX25_T2_TIMEOUT,
115 .procname = "t2_timeout", 100 .procname = "t2_timeout",
116 .maxlen = sizeof(int), 101 .maxlen = sizeof(int),
117 .mode = 0644, 102 .mode = 0644,
118 .proc_handler = proc_dointvec_minmax, 103 .proc_handler = proc_dointvec_minmax,
119 .strategy = sysctl_intvec,
120 .extra1 = &min_t2, 104 .extra1 = &min_t2,
121 .extra2 = &max_t2 105 .extra2 = &max_t2
122 }, 106 },
123 { 107 {
124 .ctl_name = NET_AX25_T3_TIMEOUT,
125 .procname = "t3_timeout", 108 .procname = "t3_timeout",
126 .maxlen = sizeof(int), 109 .maxlen = sizeof(int),
127 .mode = 0644, 110 .mode = 0644,
128 .proc_handler = proc_dointvec_minmax, 111 .proc_handler = proc_dointvec_minmax,
129 .strategy = sysctl_intvec,
130 .extra1 = &min_t3, 112 .extra1 = &min_t3,
131 .extra2 = &max_t3 113 .extra2 = &max_t3
132 }, 114 },
133 { 115 {
134 .ctl_name = NET_AX25_IDLE_TIMEOUT,
135 .procname = "idle_timeout", 116 .procname = "idle_timeout",
136 .maxlen = sizeof(int), 117 .maxlen = sizeof(int),
137 .mode = 0644, 118 .mode = 0644,
138 .proc_handler = proc_dointvec_minmax, 119 .proc_handler = proc_dointvec_minmax,
139 .strategy = sysctl_intvec,
140 .extra1 = &min_idle, 120 .extra1 = &min_idle,
141 .extra2 = &max_idle 121 .extra2 = &max_idle
142 }, 122 },
143 { 123 {
144 .ctl_name = NET_AX25_N2,
145 .procname = "maximum_retry_count", 124 .procname = "maximum_retry_count",
146 .maxlen = sizeof(int), 125 .maxlen = sizeof(int),
147 .mode = 0644, 126 .mode = 0644,
148 .proc_handler = proc_dointvec_minmax, 127 .proc_handler = proc_dointvec_minmax,
149 .strategy = sysctl_intvec,
150 .extra1 = &min_n2, 128 .extra1 = &min_n2,
151 .extra2 = &max_n2 129 .extra2 = &max_n2
152 }, 130 },
153 { 131 {
154 .ctl_name = NET_AX25_PACLEN,
155 .procname = "maximum_packet_length", 132 .procname = "maximum_packet_length",
156 .maxlen = sizeof(int), 133 .maxlen = sizeof(int),
157 .mode = 0644, 134 .mode = 0644,
158 .proc_handler = proc_dointvec_minmax, 135 .proc_handler = proc_dointvec_minmax,
159 .strategy = sysctl_intvec,
160 .extra1 = &min_paclen, 136 .extra1 = &min_paclen,
161 .extra2 = &max_paclen 137 .extra2 = &max_paclen
162 }, 138 },
163 { 139 {
164 .ctl_name = NET_AX25_PROTOCOL,
165 .procname = "protocol", 140 .procname = "protocol",
166 .maxlen = sizeof(int), 141 .maxlen = sizeof(int),
167 .mode = 0644, 142 .mode = 0644,
168 .proc_handler = proc_dointvec_minmax, 143 .proc_handler = proc_dointvec_minmax,
169 .strategy = sysctl_intvec,
170 .extra1 = &min_proto, 144 .extra1 = &min_proto,
171 .extra2 = &max_proto 145 .extra2 = &max_proto
172 }, 146 },
173#ifdef CONFIG_AX25_DAMA_SLAVE 147#ifdef CONFIG_AX25_DAMA_SLAVE
174 { 148 {
175 .ctl_name = NET_AX25_DAMA_SLAVE_TIMEOUT,
176 .procname = "dama_slave_timeout", 149 .procname = "dama_slave_timeout",
177 .maxlen = sizeof(int), 150 .maxlen = sizeof(int),
178 .mode = 0644, 151 .mode = 0644,
179 .proc_handler = proc_dointvec_minmax, 152 .proc_handler = proc_dointvec_minmax,
180 .strategy = sysctl_intvec,
181 .extra1 = &min_ds_timeout, 153 .extra1 = &min_ds_timeout,
182 .extra2 = &max_ds_timeout 154 .extra2 = &max_ds_timeout
183 }, 155 },
184#endif 156#endif
185 157
186 { .ctl_name = 0 } /* that's all, folks! */ 158 { } /* that's all, folks! */
187}; 159};
188 160
189void ax25_register_sysctl(void) 161void ax25_register_sysctl(void)
@@ -212,11 +184,9 @@ void ax25_register_sysctl(void)
212 return; 184 return;
213 } 185 }
214 ax25_table[n].child = ax25_dev->systable = child; 186 ax25_table[n].child = ax25_dev->systable = child;
215 ax25_table[n].ctl_name = n + 1;
216 ax25_table[n].procname = ax25_dev->dev->name; 187 ax25_table[n].procname = ax25_dev->dev->name;
217 ax25_table[n].mode = 0555; 188 ax25_table[n].mode = 0555;
218 189
219 child[AX25_MAX_VALUES].ctl_name = 0; /* just in case... */
220 190
221 for (k = 0; k < AX25_MAX_VALUES; k++) 191 for (k = 0; k < AX25_MAX_VALUES; k++)
222 child[k].data = &ax25_dev->values[k]; 192 child[k].data = &ax25_dev->values[k];
@@ -233,7 +203,7 @@ void ax25_unregister_sysctl(void)
233 ctl_table *p; 203 ctl_table *p;
234 unregister_sysctl_table(ax25_table_header); 204 unregister_sysctl_table(ax25_table_header);
235 205
236 for (p = ax25_table; p->ctl_name; p++) 206 for (p = ax25_table; p->procname; p++)
237 kfree(p->child); 207 kfree(p->child);
238 kfree(ax25_table); 208 kfree(ax25_table);
239} 209}