diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-16 01:04:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:47 -0400 |
commit | f221e726bf4e082a05dcd573379ac859bfba7126 (patch) | |
tree | a05f674caac693dc9aec7e46dd06115389f7ece3 /arch/mips/lasat | |
parent | f40cbaa5b0a4719489e6e7947351c99a159aca30 (diff) |
sysctl: simplify ->strategy
name and nlen parameters passed to ->strategy hook are unused, remove
them. In general ->strategy hook should know what it's doing, and don't
do something tricky for which, say, pointer to original userspace array
may be needed (name).
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net> [ networking bits ]
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/lasat')
-rw-r--r-- | arch/mips/lasat/sysctl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 866881ec0cf8..8f88886feb12 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -38,14 +38,13 @@ | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /* Strategy function to write EEPROM after changing string entry */ | 40 | /* Strategy function to write EEPROM after changing string entry */ |
41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, | 41 | int sysctl_lasatstring(ctl_table *table, |
42 | void *oldval, size_t *oldlenp, | 42 | void *oldval, size_t *oldlenp, |
43 | void *newval, size_t newlen) | 43 | void *newval, size_t newlen) |
44 | { | 44 | { |
45 | int r; | 45 | int r; |
46 | 46 | ||
47 | r = sysctl_string(table, name, | 47 | r = sysctl_string(table, oldval, oldlenp, newval, newlen); |
48 | nlen, oldval, oldlenp, newval, newlen); | ||
49 | if (r < 0) | 48 | if (r < 0) |
50 | return r; | 49 | return r; |
51 | 50 | ||
@@ -113,13 +112,13 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | |||
113 | #endif | 112 | #endif |
114 | 113 | ||
115 | /* Sysctl for setting the IP addresses */ | 114 | /* Sysctl for setting the IP addresses */ |
116 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | 115 | int sysctl_lasat_intvec(ctl_table *table, |
117 | void *oldval, size_t *oldlenp, | 116 | void *oldval, size_t *oldlenp, |
118 | void *newval, size_t newlen) | 117 | void *newval, size_t newlen) |
119 | { | 118 | { |
120 | int r; | 119 | int r; |
121 | 120 | ||
122 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); | 121 | r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); |
123 | if (r < 0) | 122 | if (r < 0) |
124 | return r; | 123 | return r; |
125 | 124 | ||
@@ -131,7 +130,7 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | |||
131 | 130 | ||
132 | #ifdef CONFIG_DS1603 | 131 | #ifdef CONFIG_DS1603 |
133 | /* Same for RTC */ | 132 | /* Same for RTC */ |
134 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, | 133 | int sysctl_lasat_rtc(ctl_table *table, |
135 | void *oldval, size_t *oldlenp, | 134 | void *oldval, size_t *oldlenp, |
136 | void *newval, size_t newlen) | 135 | void *newval, size_t newlen) |
137 | { | 136 | { |
@@ -140,7 +139,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, | |||
140 | rtctmp = read_persistent_clock(); | 139 | rtctmp = read_persistent_clock(); |
141 | if (rtctmp < 0) | 140 | if (rtctmp < 0) |
142 | rtctmp = 0; | 141 | rtctmp = 0; |
143 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); | 142 | r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); |
144 | if (r < 0) | 143 | if (r < 0) |
145 | return r; | 144 | return r; |
146 | if (newval && newlen) | 145 | if (newval && newlen) |
@@ -211,13 +210,13 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | |||
211 | } | 210 | } |
212 | #endif | 211 | #endif |
213 | 212 | ||
214 | static int sysctl_lasat_prid(ctl_table *table, int *name, int nlen, | 213 | static int sysctl_lasat_prid(ctl_table *table, |
215 | void *oldval, size_t *oldlenp, | 214 | void *oldval, size_t *oldlenp, |
216 | void *newval, size_t newlen) | 215 | void *newval, size_t newlen) |
217 | { | 216 | { |
218 | int r; | 217 | int r; |
219 | 218 | ||
220 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); | 219 | r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); |
221 | if (r < 0) | 220 | if (r < 0) |
222 | return r; | 221 | return r; |
223 | if (newval && newlen) { | 222 | if (newval && newlen) { |