Commit 1f29bcd7 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

[PATCH] sysctl: remove unused "context" param

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 98d7340c
...@@ -223,7 +223,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, ...@@ -223,7 +223,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp,
static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, static int cmode_sysctl(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (oldval && oldlenp) { if (oldval && oldlenp) {
size_t oldlen; size_t oldlen;
...@@ -326,7 +326,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, ...@@ -326,7 +326,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp,
static int p0_sysctl(ctl_table *table, int __user *name, int nlen, static int p0_sysctl(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (oldval && oldlenp) { if (oldval && oldlenp) {
size_t oldlen; size_t oldlen;
...@@ -370,7 +370,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, ...@@ -370,7 +370,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp,
static int cm_sysctl(ctl_table *table, int __user *name, int nlen, static int cm_sysctl(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (oldval && oldlenp) { if (oldval && oldlenp) {
size_t oldlen; size_t oldlen;
......
...@@ -40,12 +40,12 @@ static DEFINE_MUTEX(lasat_info_mutex); ...@@ -40,12 +40,12 @@ static DEFINE_MUTEX(lasat_info_mutex);
/* Strategy function to write EEPROM after changing string entry */ /* Strategy function to write EEPROM after changing string entry */
int sysctl_lasatstring(ctl_table *table, int *name, int nlen, int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
void *oldval, size_t *oldlenp, void *oldval, size_t *oldlenp,
void *newval, size_t newlen, void **context) void *newval, size_t newlen)
{ {
int r; int r;
mutex_lock(&lasat_info_mutex); mutex_lock(&lasat_info_mutex);
r = sysctl_string(table, name, r = sysctl_string(table, name,
nlen, oldval, oldlenp, newval, newlen, context); nlen, oldval, oldlenp, newval, newlen);
if (r < 0) { if (r < 0) {
mutex_unlock(&lasat_info_mutex); mutex_unlock(&lasat_info_mutex);
return r; return r;
...@@ -119,11 +119,11 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, ...@@ -119,11 +119,11 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
/* Sysctl for setting the IP addresses */ /* Sysctl for setting the IP addresses */
int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen,
void *oldval, size_t *oldlenp, void *oldval, size_t *oldlenp,
void *newval, size_t newlen, void **context) void *newval, size_t newlen)
{ {
int r; int r;
mutex_lock(&lasat_info_mutex); mutex_lock(&lasat_info_mutex);
r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
if (r < 0) { if (r < 0) {
mutex_unlock(&lasat_info_mutex); mutex_unlock(&lasat_info_mutex);
return r; return r;
...@@ -139,14 +139,14 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, ...@@ -139,14 +139,14 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen,
/* Same for RTC */ /* Same for RTC */
int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
void *oldval, size_t *oldlenp, void *oldval, size_t *oldlenp,
void *newval, size_t newlen, void **context) void *newval, size_t newlen)
{ {
int r; int r;
mutex_lock(&lasat_info_mutex); mutex_lock(&lasat_info_mutex);
rtctmp = ds1603_read(); rtctmp = ds1603_read();
if (rtctmp < 0) if (rtctmp < 0)
rtctmp = 0; rtctmp = 0;
r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
if (r < 0) { if (r < 0) {
mutex_unlock(&lasat_info_mutex); mutex_unlock(&lasat_info_mutex);
return r; return r;
...@@ -251,13 +251,12 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, ...@@ -251,13 +251,12 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen,
void *oldval, size_t *oldlenp, void *oldval, size_t *oldlenp,
void *newval, size_t newlen, void *newval, size_t newlen)
void **context)
{ {
int r; int r;
mutex_lock(&lasat_info_mutex); mutex_lock(&lasat_info_mutex);
r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
if (r < 0) { if (r < 0) {
mutex_unlock(&lasat_info_mutex); mutex_unlock(&lasat_info_mutex);
return r; return r;
......
...@@ -225,8 +225,7 @@ static int vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp, ...@@ -225,8 +225,7 @@ static int vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
...@@ -1203,7 +1203,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp, ...@@ -1203,7 +1203,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp,
static int uuid_strategy(ctl_table *table, int __user *name, int nlen, static int uuid_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
unsigned char tmp_uuid[16], *uuid; unsigned char tmp_uuid[16], *uuid;
unsigned int len; unsigned int len;
......
...@@ -918,8 +918,7 @@ typedef struct ctl_table ctl_table; ...@@ -918,8 +918,7 @@ typedef struct ctl_table ctl_table;
typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, typedef int ctl_handler (ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen);
void **context);
typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, typedef int proc_handler (ctl_table *ctl, int write, struct file * filp,
void __user *buffer, size_t *lenp, loff_t *ppos); void __user *buffer, size_t *lenp, loff_t *ppos);
...@@ -950,7 +949,7 @@ extern int do_sysctl (int __user *name, int nlen, ...@@ -950,7 +949,7 @@ extern int do_sysctl (int __user *name, int nlen,
extern int do_sysctl_strategy (ctl_table *table, extern int do_sysctl_strategy (ctl_table *table,
int __user *name, int nlen, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void ** context); void __user *newval, size_t newlen);
extern ctl_handler sysctl_string; extern ctl_handler sysctl_string;
extern ctl_handler sysctl_intvec; extern ctl_handler sysctl_intvec;
......
...@@ -376,8 +376,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, ...@@ -376,8 +376,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write,
size_t *lenp, loff_t *ppos); size_t *lenp, loff_t *ppos);
int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen);
void **context);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
extern int ip_misc_proc_init(void); extern int ip_misc_proc_init(void);
#endif #endif
......
...@@ -368,7 +368,7 @@ static inline void sctp_sysctl_register(void) { return; } ...@@ -368,7 +368,7 @@ static inline void sctp_sysctl_register(void) { return; }
static inline void sctp_sysctl_unregister(void) { return; } static inline void sctp_sysctl_unregister(void) { return; }
static inline int sctp_sysctl_jiffies_ms(ctl_table *table, int __user *name, int nlen, static inline int sctp_sysctl_jiffies_ms(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) { void __user *newval, size_t newlen) {
return -ENOSYS; return -ENOSYS;
} }
#endif #endif
......
...@@ -133,7 +133,7 @@ extern int max_lock_depth; ...@@ -133,7 +133,7 @@ extern int max_lock_depth;
#ifdef CONFIG_SYSCTL_SYSCALL #ifdef CONFIG_SYSCTL_SYSCALL
static int parse_table(int __user *, int, void __user *, size_t __user *, static int parse_table(int __user *, int, void __user *, size_t __user *,
void __user *, size_t, ctl_table *, void **); void __user *, size_t, ctl_table *);
#endif #endif
static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
...@@ -141,12 +141,12 @@ static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, ...@@ -141,12 +141,12 @@ static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context); void __user *newval, size_t newlen);
#ifdef CONFIG_SYSVIPC #ifdef CONFIG_SYSVIPC
static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context); void __user *newval, size_t newlen);
#endif #endif
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_PROC_SYSCTL
...@@ -1243,7 +1243,6 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol ...@@ -1243,7 +1243,6 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
do { do {
struct ctl_table_header *head = struct ctl_table_header *head =
list_entry(tmp, struct ctl_table_header, ctl_entry); list_entry(tmp, struct ctl_table_header, ctl_entry);
void *context = NULL;
if (!use_table(head)) if (!use_table(head))
continue; continue;
...@@ -1251,9 +1250,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol ...@@ -1251,9 +1250,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
spin_unlock(&sysctl_lock); spin_unlock(&sysctl_lock);
error = parse_table(name, nlen, oldval, oldlenp, error = parse_table(name, nlen, oldval, oldlenp,
newval, newlen, head->ctl_table, newval, newlen, head->ctl_table);
&context);
kfree(context);
spin_lock(&sysctl_lock); spin_lock(&sysctl_lock);
unuse_table(head); unuse_table(head);
...@@ -1309,7 +1306,7 @@ static inline int ctl_perm(ctl_table *table, int op) ...@@ -1309,7 +1306,7 @@ static inline int ctl_perm(ctl_table *table, int op)
static int parse_table(int __user *name, int nlen, static int parse_table(int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen,
ctl_table *table, void **context) ctl_table *table)
{ {
int n; int n;
repeat: repeat:
...@@ -1329,7 +1326,7 @@ static int parse_table(int __user *name, int nlen, ...@@ -1329,7 +1326,7 @@ static int parse_table(int __user *name, int nlen,
error = table->strategy( error = table->strategy(
table, name, nlen, table, name, nlen,
oldval, oldlenp, oldval, oldlenp,
newval, newlen, context); newval, newlen);
if (error) if (error)
return error; return error;
} }
...@@ -1340,7 +1337,7 @@ static int parse_table(int __user *name, int nlen, ...@@ -1340,7 +1337,7 @@ static int parse_table(int __user *name, int nlen,
} }
error = do_sysctl_strategy(table, name, nlen, error = do_sysctl_strategy(table, name, nlen,
oldval, oldlenp, oldval, oldlenp,
newval, newlen, context); newval, newlen);
return error; return error;
} }
} }
...@@ -1351,7 +1348,7 @@ static int parse_table(int __user *name, int nlen, ...@@ -1351,7 +1348,7 @@ static int parse_table(int __user *name, int nlen,
int do_sysctl_strategy (ctl_table *table, int do_sysctl_strategy (ctl_table *table,
int __user *name, int nlen, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
int op = 0, rc; int op = 0, rc;
size_t len; size_t len;
...@@ -1365,7 +1362,7 @@ int do_sysctl_strategy (ctl_table *table, ...@@ -1365,7 +1362,7 @@ int do_sysctl_strategy (ctl_table *table,
if (table->strategy) { if (table->strategy) {
rc = table->strategy(table, name, nlen, oldval, oldlenp, rc = table->strategy(table, name, nlen, oldval, oldlenp,
newval, newlen, context); newval, newlen);
if (rc < 0) if (rc < 0)
return rc; return rc;
if (rc > 0) if (rc > 0)
...@@ -2473,7 +2470,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write, ...@@ -2473,7 +2470,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write,
/* The generic string strategy routine: */ /* The generic string strategy routine: */
int sysctl_string(ctl_table *table, int __user *name, int nlen, int sysctl_string(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (!table->data || !table->maxlen) if (!table->data || !table->maxlen)
return -ENOTDIR; return -ENOTDIR;
...@@ -2519,7 +2516,7 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen, ...@@ -2519,7 +2516,7 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen,
*/ */
int sysctl_intvec(ctl_table *table, int __user *name, int nlen, int sysctl_intvec(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (newval && newlen) { if (newval && newlen) {
...@@ -2555,7 +2552,7 @@ int sysctl_intvec(ctl_table *table, int __user *name, int nlen, ...@@ -2555,7 +2552,7 @@ int sysctl_intvec(ctl_table *table, int __user *name, int nlen,
/* Strategy function to convert jiffies to seconds */ /* Strategy function to convert jiffies to seconds */
int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, int sysctl_jiffies(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (oldval) { if (oldval) {
size_t olen; size_t olen;
...@@ -2583,7 +2580,7 @@ int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, ...@@ -2583,7 +2580,7 @@ int sysctl_jiffies(ctl_table *table, int __user *name, int nlen,
/* Strategy function to convert jiffies to seconds */ /* Strategy function to convert jiffies to seconds */
int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
if (oldval) { if (oldval) {
size_t olen; size_t olen;
...@@ -2612,7 +2609,7 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, ...@@ -2612,7 +2609,7 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
/* The generic string strategy routine: */ /* The generic string strategy routine: */
static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
struct ctl_table uts_table; struct ctl_table uts_table;
int r, write; int r, write;
...@@ -2620,7 +2617,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, ...@@ -2620,7 +2617,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
memcpy(&uts_table, table, sizeof(uts_table)); memcpy(&uts_table, table, sizeof(uts_table));
uts_table.data = get_uts(table, write); uts_table.data = get_uts(table, write);
r = sysctl_string(&uts_table, name, nlen, r = sysctl_string(&uts_table, name, nlen,
oldval, oldlenp, newval, newlen, context); oldval, oldlenp, newval, newlen);
put_uts(table, write, uts_table.data); put_uts(table, write, uts_table.data);
return r; return r;
} }
...@@ -2629,7 +2626,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, ...@@ -2629,7 +2626,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
/* The generic sysctl ipc data routine. */ /* The generic sysctl ipc data routine. */
static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
size_t len; size_t len;
void *data; void *data;
...@@ -2704,41 +2701,41 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args) ...@@ -2704,41 +2701,41 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
int sysctl_string(ctl_table *table, int __user *name, int nlen, int sysctl_string(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
return -ENOSYS; return -ENOSYS;
} }
int sysctl_intvec(ctl_table *table, int __user *name, int nlen, int sysctl_intvec(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
return -ENOSYS; return -ENOSYS;
} }
int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, int sysctl_jiffies(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
return -ENOSYS; return -ENOSYS;
} }
int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
return -ENOSYS; return -ENOSYS;
} }
static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
return -ENOSYS; return -ENOSYS;
} }
static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void **context) void __user *newval, size_t newlen)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
...@@ -167,8 +167,7 @@ static int dn_forwarding_proc(ctl_table *, int, struct file *, ...@@ -167,8 +167,7 @@ static int dn_forwarding_proc(ctl_table *, int, struct file *,
void __user *, size_t *, loff_t *); void __user *, size_t *, loff_t *);
static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen);
void **context);
static struct dn_dev_sysctl_table { static struct dn_dev_sysctl_table {
struct ctl_table_header *sysctl_header; struct ctl_table_header *sysctl_header;
...@@ -347,8 +346,7 @@ static int dn_forwarding_proc(ctl_table *table, int write, ...@@ -347,8 +346,7 @@ static int dn_forwarding_proc(ctl_table *table, int write,
static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
#ifdef CONFIG_DECNET_ROUTER #ifdef CONFIG_DECNET_ROUTER
struct net_device *dev = table->extra1; struct net_device *dev = table->extra1;
......
...@@ -134,8 +134,7 @@ static int parse_addr(__le16 *addr, char *str) ...@@ -134,8 +134,7 @@ static int parse_addr(__le16 *addr, char *str)
static int dn_node_address_strategy(ctl_table *table, int __user *name, int nlen, static int dn_node_address_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
size_t len; size_t len;
__le16 addr; __le16 addr;
...@@ -220,8 +219,7 @@ static int dn_node_address_handler(ctl_table *table, int write, ...@@ -220,8 +219,7 @@ static int dn_node_address_handler(ctl_table *table, int write,
static int dn_def_dev_strategy(ctl_table *table, int __user *name, int nlen, static int dn_def_dev_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
size_t len; size_t len;
struct net_device *dev; struct net_device *dev;
......
...@@ -1303,8 +1303,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, ...@@ -1303,8 +1303,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write,
int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
int *valp = table->data; int *valp = table->data;
int new; int new;
......
...@@ -2872,8 +2872,7 @@ static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table, ...@@ -2872,8 +2872,7 @@ static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table,
void __user *oldval, void __user *oldval,
size_t __user *oldlenp, size_t __user *oldlenp,
void __user *newval, void __user *newval,
size_t newlen, size_t newlen)
void **context)
{ {
int delay; int delay;
if (newlen != sizeof(int)) if (newlen != sizeof(int))
......
...@@ -51,8 +51,7 @@ int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp, ...@@ -51,8 +51,7 @@ int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
static int ipv4_sysctl_forward_strategy(ctl_table *table, static int ipv4_sysctl_forward_strategy(ctl_table *table,
int __user *name, int nlen, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
int *valp = table->data; int *valp = table->data;
int new; int new;
...@@ -111,8 +110,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * ...@@ -111,8 +110,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file *
static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
int nlen, void __user *oldval, int nlen, void __user *oldval,
size_t __user *oldlenp, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
char val[TCP_CA_NAME_MAX]; char val[TCP_CA_NAME_MAX];
ctl_table tbl = { ctl_table tbl = {
...@@ -122,8 +120,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, ...@@ -122,8 +120,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
int ret; int ret;
tcp_get_default_congestion_control(val); tcp_get_default_congestion_control(val);
ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen, ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
context);
if (ret == 0 && newval && newlen) if (ret == 0 && newval && newlen)
ret = tcp_set_default_congestion_control(val); ret = tcp_set_default_congestion_control(val);
return ret; return ret;
...@@ -169,8 +166,8 @@ static int proc_allowed_congestion_control(ctl_table *ctl, ...@@ -169,8 +166,8 @@ static int proc_allowed_congestion_control(ctl_table *ctl,
static int strategy_allowed_congestion_control(ctl_table *table, int __user *name, static int strategy_allowed_congestion_control(ctl_table *table, int __user *name,
int nlen, void __user *oldval, int nlen, void __user *oldval,
size_t __user *oldlenp, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval,
void **context) size_t newlen)
{ {
ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX }; ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
int ret; int ret;
...@@ -180,8 +177,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam ...@@ -180,8 +177,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam
return -ENOMEM; return -ENOMEM;
tcp_get_available_congestion_control(tbl.data, tbl.maxlen); tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen, ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
context);
if (ret == 0 && newval && newlen) if (ret == 0 && newval && newlen)
ret = tcp_set_allowed_congestion_control(tbl.data); ret = tcp_set_allowed_congestion_control(tbl.data);
kfree(tbl.data); kfree(tbl.data);
......
...@@ -3656,8 +3656,7 @@ static int addrconf_sysctl_forward_strategy(ctl_table *table, ...@@ -3656,8 +3656,7 @@ static int addrconf_sysctl_forward_strategy(ctl_table *table,
int __user *name, int nlen, int __user *name, int nlen,
void __user *oldval, void __user *oldval,
size_t __user *oldlenp, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
int *valp = table->data; int *valp = table->data;
int new; int new;
......
...@@ -1667,8 +1667,7 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f ...@@ -1667,8 +1667,7 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
int nlen, void __user *oldval, int nlen, void __user *oldval,
size_t __user *oldlenp, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen)
void **context)
{ {
struct net_device *dev = ctl->extra1; struct net_device *dev = ctl->extra1;
struct inet6_dev *idev; struct inet6_dev *idev;
...@@ -1681,14 +1680,12 @@ static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, ...@@ -1681,14 +1680,12 @@ static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
switch (ctl->ctl_name) { switch (ctl->ctl_name) {
case NET_NEIGH_REACHABLE_TIME: case NET_NEIGH_REACHABLE_TIME:
ret = sysctl_jiffies(ctl, name, nlen, ret = sysctl_jiffies(ctl, name, nlen,
oldval, oldlenp, newval, newlen, oldval, oldlenp, newval, newlen);
context);
break; break;
case NET_NEIGH_RETRANS_TIME_MS: case NET_NEIGH_RETRANS_TIME_MS:
case NET_NEIGH_REACHABLE_TIME_MS: case NET_NEIGH_REACHABLE_TIME_MS:
ret = sysctl_ms_jiffies(ctl, name, nlen, ret = sysctl_ms_jiffies(ctl, name, nlen,
oldval, oldlenp, newval, newlen, oldval, oldlenp, newval, newlen);
context);
break; break;
default: default:
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment