Commit fe2c6338 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net: Convert uses of typedef ctl_table to struct ctl_table

Reduce the uses of this unnecessary typedef.

Done via perl script:

$ git grep --name-only -w ctl_table net | \
  xargs perl -p -i -e '\
	sub trim { my ($local) = @_; $local =~ s/(^\s+|\s+$)//g; return $local; } \
        s/\b(?<!struct\s)ctl_table\b(\s*\*\s*|\s+\w+)/"struct ctl_table " . trim($1)/ge'

Reflow the modified lines that now exceed 80 columns.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 194f4a6d
...@@ -29,7 +29,7 @@ static int min_proto[1], max_proto[] = { AX25_PROTO_MAX }; ...@@ -29,7 +29,7 @@ static int min_proto[1], max_proto[] = { AX25_PROTO_MAX };
static int min_ds_timeout[1], max_ds_timeout[] = {65535000}; static int min_ds_timeout[1], max_ds_timeout[] = {65535000};
#endif #endif
static const ctl_table ax25_param_table[] = { static const struct ctl_table ax25_param_table[] = {
{ {
.procname = "ip_default_mode", .procname = "ip_default_mode",
.maxlen = sizeof(int), .maxlen = sizeof(int),
......
...@@ -992,7 +992,7 @@ static struct nf_hook_ops br_nf_ops[] __read_mostly = { ...@@ -992,7 +992,7 @@ static struct nf_hook_ops br_nf_ops[] __read_mostly = {
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static static
int brnf_sysctl_call_tables(ctl_table * ctl, int write, int brnf_sysctl_call_tables(struct ctl_table *ctl, int write,
void __user * buffer, size_t * lenp, loff_t * ppos) void __user * buffer, size_t * lenp, loff_t * ppos)
{ {
int ret; int ret;
...@@ -1004,7 +1004,7 @@ int brnf_sysctl_call_tables(ctl_table * ctl, int write, ...@@ -1004,7 +1004,7 @@ int brnf_sysctl_call_tables(ctl_table * ctl, int write,
return ret; return ret;
} }
static ctl_table brnf_table[] = { static struct ctl_table brnf_table[] = {
{ {
.procname = "bridge-nf-call-arptables", .procname = "bridge-nf-call-arptables",
.data = &brnf_call_arptables, .data = &brnf_call_arptables,
......
...@@ -2765,11 +2765,11 @@ EXPORT_SYMBOL(neigh_app_ns); ...@@ -2765,11 +2765,11 @@ EXPORT_SYMBOL(neigh_app_ns);
static int zero; static int zero;
static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer, static int proc_unres_qlen(struct ctl_table *ctl, int write,
size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int size, ret; int size, ret;
ctl_table tmp = *ctl; struct ctl_table tmp = *ctl;
tmp.extra1 = &zero; tmp.extra1 = &zero;
tmp.extra2 = &unres_qlen_max; tmp.extra2 = &unres_qlen_max;
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
static int one = 1; static int one = 1;
#ifdef CONFIG_RPS #ifdef CONFIG_RPS
static int rps_sock_flow_sysctl(ctl_table *table, int write, static int rps_sock_flow_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
unsigned int orig_size, size; unsigned int orig_size, size;
int ret, i; int ret, i;
ctl_table tmp = { struct ctl_table tmp = {
.data = &size, .data = &size,
.maxlen = sizeof(size), .maxlen = sizeof(size),
.mode = table->mode .mode = table->mode
...@@ -91,7 +91,7 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write, ...@@ -91,7 +91,7 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write,
#ifdef CONFIG_NET_FLOW_LIMIT #ifdef CONFIG_NET_FLOW_LIMIT
static DEFINE_MUTEX(flow_limit_update_mutex); static DEFINE_MUTEX(flow_limit_update_mutex);
static int flow_limit_cpu_sysctl(ctl_table *table, int write, static int flow_limit_cpu_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
...@@ -156,7 +156,7 @@ static int flow_limit_cpu_sysctl(ctl_table *table, int write, ...@@ -156,7 +156,7 @@ static int flow_limit_cpu_sysctl(ctl_table *table, int write,
return ret; return ret;
} }
static int flow_limit_table_len_sysctl(ctl_table *table, int write, static int flow_limit_table_len_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
......
...@@ -158,11 +158,11 @@ static int max_t3[] = { 8191 }; /* Must fit in 16 bits when multiplied by BCT3MU ...@@ -158,11 +158,11 @@ static int max_t3[] = { 8191 }; /* Must fit in 16 bits when multiplied by BCT3MU
static int min_priority[1]; static int min_priority[1];
static int max_priority[] = { 127 }; /* From DECnet spec */ static int max_priority[] = { 127 }; /* From DECnet spec */
static int dn_forwarding_proc(ctl_table *, int, static int dn_forwarding_proc(struct ctl_table *, int,
void __user *, size_t *, loff_t *); void __user *, size_t *, loff_t *);
static struct dn_dev_sysctl_table { static struct dn_dev_sysctl_table {
struct ctl_table_header *sysctl_header; struct ctl_table_header *sysctl_header;
ctl_table dn_dev_vars[5]; struct ctl_table dn_dev_vars[5];
} dn_dev_sysctl = { } dn_dev_sysctl = {
NULL, NULL,
{ {
...@@ -242,7 +242,7 @@ static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms) ...@@ -242,7 +242,7 @@ static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms)
} }
} }
static int dn_forwarding_proc(ctl_table *table, int write, static int dn_forwarding_proc(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
......
...@@ -132,7 +132,7 @@ static int parse_addr(__le16 *addr, char *str) ...@@ -132,7 +132,7 @@ static int parse_addr(__le16 *addr, char *str)
return 0; return 0;
} }
static int dn_node_address_handler(ctl_table *table, int write, static int dn_node_address_handler(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
...@@ -183,7 +183,7 @@ static int dn_node_address_handler(ctl_table *table, int write, ...@@ -183,7 +183,7 @@ static int dn_node_address_handler(ctl_table *table, int write,
return 0; return 0;
} }
static int dn_def_dev_handler(ctl_table *table, int write, static int dn_def_dev_handler(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
...@@ -246,7 +246,7 @@ static int dn_def_dev_handler(ctl_table *table, int write, ...@@ -246,7 +246,7 @@ static int dn_def_dev_handler(ctl_table *table, int write,
return 0; return 0;
} }
static ctl_table dn_table[] = { static struct ctl_table dn_table[] = {
{ {
.procname = "node_address", .procname = "node_address",
.maxlen = 7, .maxlen = 7,
......
...@@ -1942,7 +1942,7 @@ static void inet_forward_change(struct net *net) ...@@ -1942,7 +1942,7 @@ static void inet_forward_change(struct net *net)
} }
} }
static int devinet_conf_proc(ctl_table *ctl, int write, static int devinet_conf_proc(struct ctl_table *ctl, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
...@@ -1985,7 +1985,7 @@ static int devinet_conf_proc(ctl_table *ctl, int write, ...@@ -1985,7 +1985,7 @@ static int devinet_conf_proc(ctl_table *ctl, int write,
return ret; return ret;
} }
static int devinet_sysctl_forward(ctl_table *ctl, int write, static int devinet_sysctl_forward(struct ctl_table *ctl, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
...@@ -2028,7 +2028,7 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, ...@@ -2028,7 +2028,7 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
return ret; return ret;
} }
static int ipv4_doint_and_flush(ctl_table *ctl, int write, static int ipv4_doint_and_flush(struct ctl_table *ctl, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
......
...@@ -223,7 +223,7 @@ static struct nf_hook_ops ipv4_conntrack_ops[] __read_mostly = { ...@@ -223,7 +223,7 @@ static struct nf_hook_ops ipv4_conntrack_ops[] __read_mostly = {
static int log_invalid_proto_min = 0; static int log_invalid_proto_min = 0;
static int log_invalid_proto_max = 255; static int log_invalid_proto_max = 255;
static ctl_table ip_ct_sysctl_table[] = { static struct ctl_table ip_ct_sysctl_table[] = {
{ {
.procname = "ip_conntrack_max", .procname = "ip_conntrack_max",
.maxlen = sizeof(int), .maxlen = sizeof(int),
......
...@@ -2448,7 +2448,7 @@ static int ip_rt_gc_interval __read_mostly = 60 * HZ; ...@@ -2448,7 +2448,7 @@ static int ip_rt_gc_interval __read_mostly = 60 * HZ;
static int ip_rt_gc_min_interval __read_mostly = HZ / 2; static int ip_rt_gc_min_interval __read_mostly = HZ / 2;
static int ip_rt_gc_elasticity __read_mostly = 8; static int ip_rt_gc_elasticity __read_mostly = 8;
static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
...@@ -2463,7 +2463,7 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, ...@@ -2463,7 +2463,7 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,
return -EINVAL; return -EINVAL;
} }
static ctl_table ipv4_route_table[] = { static struct ctl_table ipv4_route_table[] = {
{ {
.procname = "gc_thresh", .procname = "gc_thresh",
.data = &ipv4_dst_ops.gc_thresh, .data = &ipv4_dst_ops.gc_thresh,
......
...@@ -49,13 +49,13 @@ static void set_local_port_range(int range[2]) ...@@ -49,13 +49,13 @@ static void set_local_port_range(int range[2])
} }
/* Validate changes from /proc interface. */ /* Validate changes from /proc interface. */
static int ipv4_local_port_range(ctl_table *table, int write, static int ipv4_local_port_range(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
int ret; int ret;
int range[2]; int range[2];
ctl_table tmp = { struct ctl_table tmp = {
.data = &range, .data = &range,
.maxlen = sizeof(range), .maxlen = sizeof(range),
.mode = table->mode, .mode = table->mode,
...@@ -100,7 +100,7 @@ static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t hig ...@@ -100,7 +100,7 @@ static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t hig
} }
/* Validate changes from /proc interface. */ /* Validate changes from /proc interface. */
static int ipv4_ping_group_range(ctl_table *table, int write, static int ipv4_ping_group_range(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
...@@ -108,7 +108,7 @@ static int ipv4_ping_group_range(ctl_table *table, int write, ...@@ -108,7 +108,7 @@ static int ipv4_ping_group_range(ctl_table *table, int write,
int ret; int ret;
gid_t urange[2]; gid_t urange[2];
kgid_t low, high; kgid_t low, high;
ctl_table tmp = { struct ctl_table tmp = {
.data = &urange, .data = &urange,
.maxlen = sizeof(urange), .maxlen = sizeof(urange),
.mode = table->mode, .mode = table->mode,
...@@ -135,11 +135,11 @@ static int ipv4_ping_group_range(ctl_table *table, int write, ...@@ -135,11 +135,11 @@ static int ipv4_ping_group_range(ctl_table *table, int write,
return ret; return ret;
} }
static int proc_tcp_congestion_control(ctl_table *ctl, int write, static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
char val[TCP_CA_NAME_MAX]; char val[TCP_CA_NAME_MAX];
ctl_table tbl = { struct ctl_table tbl = {
.data = val, .data = val,
.maxlen = TCP_CA_NAME_MAX, .maxlen = TCP_CA_NAME_MAX,
}; };
...@@ -153,12 +153,12 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, ...@@ -153,12 +153,12 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write,
return ret; return ret;
} }
static int proc_tcp_available_congestion_control(ctl_table *ctl, static int proc_tcp_available_congestion_control(struct ctl_table *ctl,
int write, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX, }; struct ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX, };
int ret; int ret;
tbl.data = kmalloc(tbl.maxlen, GFP_USER); tbl.data = kmalloc(tbl.maxlen, GFP_USER);
...@@ -170,12 +170,12 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl, ...@@ -170,12 +170,12 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl,
return ret; return ret;
} }
static int proc_allowed_congestion_control(ctl_table *ctl, static int proc_allowed_congestion_control(struct ctl_table *ctl,
int write, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX }; struct ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
int ret; int ret;
tbl.data = kmalloc(tbl.maxlen, GFP_USER); tbl.data = kmalloc(tbl.maxlen, GFP_USER);
...@@ -190,7 +190,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl, ...@@ -190,7 +190,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl,
return ret; return ret;
} }
static int ipv4_tcp_mem(ctl_table *ctl, int write, static int ipv4_tcp_mem(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
...@@ -201,7 +201,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write, ...@@ -201,7 +201,7 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
struct mem_cgroup *memcg; struct mem_cgroup *memcg;
#endif #endif
ctl_table tmp = { struct ctl_table tmp = {
.data = &vec, .data = &vec,
.maxlen = sizeof(vec), .maxlen = sizeof(vec),
.mode = ctl->mode, .mode = ctl->mode,
...@@ -233,10 +233,11 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write, ...@@ -233,10 +233,11 @@ static int ipv4_tcp_mem(ctl_table *ctl, int write,
return 0; return 0;
} }
static int proc_tcp_fastopen_key(ctl_table *ctl, int write, void __user *buffer, static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write,
size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp,
loff_t *ppos)
{ {
ctl_table tbl = { .maxlen = (TCP_FASTOPEN_KEY_LENGTH * 2 + 10) }; struct ctl_table tbl = { .maxlen = (TCP_FASTOPEN_KEY_LENGTH * 2 + 10) };
struct tcp_fastopen_context *ctxt; struct tcp_fastopen_context *ctxt;
int ret; int ret;
u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */ u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */
......
...@@ -4620,13 +4620,13 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) ...@@ -4620,13 +4620,13 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static static
int addrconf_sysctl_forward(ctl_table *ctl, int write, int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int *valp = ctl->data; int *valp = ctl->data;
int val = *valp; int val = *valp;
loff_t pos = *ppos; loff_t pos = *ppos;
ctl_table lctl; struct ctl_table lctl;
int ret; int ret;
/* /*
...@@ -4705,13 +4705,13 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf) ...@@ -4705,13 +4705,13 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf)
} }
static static
int addrconf_sysctl_disable(ctl_table *ctl, int write, int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int *valp = ctl->data; int *valp = ctl->data;
int val = *valp; int val = *valp;
loff_t pos = *ppos; loff_t pos = *ppos;
ctl_table lctl; struct ctl_table lctl;
int ret; int ret;
/* /*
...@@ -4733,7 +4733,7 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write, ...@@ -4733,7 +4733,7 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write,
static struct addrconf_sysctl_table static struct addrconf_sysctl_table
{ {
struct ctl_table_header *sysctl_header; struct ctl_table_header *sysctl_header;
ctl_table addrconf_vars[DEVCONF_MAX+1]; struct ctl_table addrconf_vars[DEVCONF_MAX+1];
} addrconf_sysctl __read_mostly = { } addrconf_sysctl __read_mostly = {
.sysctl_header = NULL, .sysctl_header = NULL,
.addrconf_vars = { .addrconf_vars = {
......
...@@ -976,7 +976,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err) ...@@ -976,7 +976,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)
EXPORT_SYMBOL(icmpv6_err_convert); EXPORT_SYMBOL(icmpv6_err_convert);
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
ctl_table ipv6_icmp_table_template[] = { struct ctl_table ipv6_icmp_table_template[] = {
{ {
.procname = "ratelimit", .procname = "ratelimit",
.data = &init_net.ipv6.sysctl.icmpv6_time, .data = &init_net.ipv6.sysctl.icmpv6_time,
......
...@@ -2790,7 +2790,7 @@ static const struct file_operations rt6_stats_seq_fops = { ...@@ -2790,7 +2790,7 @@ static const struct file_operations rt6_stats_seq_fops = {
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static static
int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
struct net *net; struct net *net;
...@@ -2805,7 +2805,7 @@ int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, ...@@ -2805,7 +2805,7 @@ int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write,
return 0; return 0;
} }
ctl_table ipv6_route_table_template[] = { struct ctl_table ipv6_route_table_template[] = {
{ {
.procname = "flush", .procname = "flush",
.data = &init_net.ipv6.sysctl.flush_delay, .data = &init_net.ipv6.sysctl.flush_delay,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <net/addrconf.h> #include <net/addrconf.h>
#include <net/inet_frag.h> #include <net/inet_frag.h>
static ctl_table ipv6_table_template[] = { static struct ctl_table ipv6_table_template[] = {
{ {
.procname = "bindv6only", .procname = "bindv6only",
.data = &init_net.ipv6.sysctl.bindv6only, .data = &init_net.ipv6.sysctl.bindv6only,
...@@ -27,7 +27,7 @@ static ctl_table ipv6_table_template[] = { ...@@ -27,7 +27,7 @@ static ctl_table ipv6_table_template[] = {
{ } { }
}; };
static ctl_table ipv6_rotable[] = { static struct ctl_table ipv6_rotable[] = {
{ {
.procname = "mld_max_msf", .procname = "mld_max_msf",
.data = &sysctl_mld_max_msf, .data = &sysctl_mld_max_msf,
......
...@@ -73,7 +73,7 @@ static int min_lap_keepalive_time = 100; /* 100us */ ...@@ -73,7 +73,7 @@ static int min_lap_keepalive_time = 100; /* 100us */
/* For other sysctl, I've no idea of the range. Maybe Dag could help /* For other sysctl, I've no idea of the range. Maybe Dag could help
* us on that - Jean II */ * us on that - Jean II */
static int do_devname(ctl_table *table, int write, static int do_devname(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int ret; int ret;
...@@ -90,7 +90,7 @@ static int do_devname(ctl_table *table, int write, ...@@ -90,7 +90,7 @@ static int do_devname(ctl_table *table, int write,
} }
static int do_discovery(ctl_table *table, int write, static int do_discovery(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int ret; int ret;
...@@ -111,7 +111,7 @@ static int do_discovery(ctl_table *table, int write, ...@@ -111,7 +111,7 @@ static int do_discovery(ctl_table *table, int write,
} }
/* One file */ /* One file */
static ctl_table irda_table[] = { static struct ctl_table irda_table[] = {
{ {
.procname = "discovery", .procname = "discovery",
.data = &sysctl_discovery, .data = &sysctl_discovery,
......
...@@ -1575,7 +1575,7 @@ static int zero; ...@@ -1575,7 +1575,7 @@ static int zero;
static int three = 3; static int three = 3;
static int static int
proc_do_defense_mode(ctl_table *table, int write, proc_do_defense_mode(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
struct net *net = current->nsproxy->net_ns; struct net *net = current->nsproxy->net_ns;
...@@ -1596,7 +1596,7 @@ proc_do_defense_mode(ctl_table *table, int write, ...@@ -1596,7 +1596,7 @@ proc_do_defense_mode(ctl_table *table, int write,
} }
static int static int
proc_do_sync_threshold(ctl_table *table, int write, proc_do_sync_threshold(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int *valp = table->data; int *valp = table->data;
...@@ -1616,7 +1616,7 @@ proc_do_sync_threshold(ctl_table *table, int write, ...@@ -1616,7 +1616,7 @@ proc_do_sync_threshold(ctl_table *table, int write,
} }
static int static int
proc_do_sync_mode(ctl_table *table, int write, proc_do_sync_mode(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int *valp = table->data; int *valp = table->data;
...@@ -1634,7 +1634,7 @@ proc_do_sync_mode(ctl_table *table, int write, ...@@ -1634,7 +1634,7 @@ proc_do_sync_mode(ctl_table *table, int write,
} }
static int static int
proc_do_sync_ports(ctl_table *table, int write, proc_do_sync_ports(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int *valp = table->data; int *valp = table->data;
......
...@@ -118,7 +118,7 @@ struct ip_vs_lblc_table { ...@@ -118,7 +118,7 @@ struct ip_vs_lblc_table {
* IPVS LBLC sysctl table * IPVS LBLC sysctl table
*/ */
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static ctl_table vs_vars_table[] = { static struct ctl_table vs_vars_table[] = {
{ {
.procname = "lblc_expiration", .procname = "lblc_expiration",
.data = NULL, .data = NULL,
......
...@@ -299,7 +299,7 @@ struct ip_vs_lblcr_table { ...@@ -299,7 +299,7 @@ struct ip_vs_lblcr_table {
* IPVS LBLCR sysctl table * IPVS LBLCR sysctl table
*/ */
static ctl_table vs_vars_table[] = { static struct ctl_table vs_vars_table[] = {
{ {
.procname = "lblcr_expiration", .procname = "lblcr_expiration",
.data = NULL, .data = NULL,
......
...@@ -408,7 +408,7 @@ static int log_invalid_proto_max = 255; ...@@ -408,7 +408,7 @@ static int log_invalid_proto_max = 255;
static struct ctl_table_header *nf_ct_netfilter_header; static struct ctl_table_header *nf_ct_netfilter_header;
static ctl_table nf_ct_sysctl_table[] = { static struct ctl_table nf_ct_sysctl_table[] = {
{ {
.procname = "nf_conntrack_max", .procname = "nf_conntrack_max",
.data = &nf_conntrack_max, .data = &nf_conntrack_max,
...@@ -458,7 +458,7 @@ static ctl_table nf_ct_sysctl_table[] = { ...@@ -458,7 +458,7 @@ static ctl_table nf_ct_sysctl_table[] = {
#define NET_NF_CONNTRACK_MAX 2089 #define NET_NF_CONNTRACK_MAX 2089
static ctl_table nf_ct_netfilter_table[] = { static struct ctl_table nf_ct_netfilter_table[] = {
{ {
.procname = "nf_conntrack_max", .procname = "nf_conntrack_max",
.data = &nf_conntrack_max, .data = &nf_conntrack_max,
......
...@@ -245,7 +245,7 @@ static const struct file_operations nflog_file_ops = { ...@@ -245,7 +245,7 @@ static const struct file_operations nflog_file_ops = {
static char nf_log_sysctl_fnames[NFPROTO_NUMPROTO-NFPROTO_UNSPEC][3]; static char nf_log_sysctl_fnames[NFPROTO_NUMPROTO-NFPROTO_UNSPEC][3];
static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1]; static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1];
static int nf_log_proc_dostring(ctl_table *table, int write, static int nf_log_proc_dostring(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
const struct nf_logger *logger; const struct nf_logger *logger;
......
...@@ -34,7 +34,7 @@ static int min_reset[] = {0}, max_reset[] = {1}; ...@@ -34,7 +34,7 @@ static int min_reset[] = {0}, max_reset[] = {1};
static struct ctl_table_header *nr_table_header; static struct ctl_table_header *nr_table_header;
static ctl_table nr_table[] = { static struct ctl_table nr_table[] = {
{ {
.procname = "default_path_quality", .procname = "default_path_quality",
.data = &sysctl_netrom_default_path_quality, .data = &sysctl_netrom_default_path_quality,
......
...@@ -61,13 +61,13 @@ void phonet_get_local_port_range(int *min, int *max) ...@@ -61,13 +61,13 @@ void phonet_get_local_port_range(int *min, int *max)
} while (read_seqretry(&local_port_range_lock, seq)); } while (read_seqretry(&local_port_range_lock, seq));
} }
static int proc_local_port_range(ctl_table *table, int write, static int proc_local_port_range(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
int ret; int ret;
int range[2] = {local_port_range[0], local_port_range[1]}; int range[2] = {local_port_range[0], local_port_range[1]};
ctl_table tmp = { struct ctl_table tmp = {
.data = &range, .data = &range,
.maxlen = sizeof(range), .maxlen = sizeof(range),
.mode = table->mode, .mode = table->mode,
......
...@@ -61,7 +61,7 @@ static unsigned long rds_ib_sysctl_max_unsig_wr_max = 64; ...@@ -61,7 +61,7 @@ static unsigned long rds_ib_sysctl_max_unsig_wr_max = 64;
*/ */
unsigned int rds_ib_sysctl_flow_control = 0; unsigned int rds_ib_sysctl_flow_control = 0;
static ctl_table rds_ib_sysctl_table[] = { static struct ctl_table rds_ib_sysctl_table[] = {
{ {
.procname = "max_send_wr", .procname = "max_send_wr",
.data = &rds_ib_sysctl_max_send_wr, .data = &rds_ib_sysctl_max_send_wr,
......
...@@ -55,7 +55,7 @@ static unsigned long rds_iw_sysctl_max_unsig_bytes_max = ~0UL; ...@@ -55,7 +55,7 @@ static unsigned long rds_iw_sysctl_max_unsig_bytes_max = ~0UL;
unsigned int rds_iw_sysctl_flow_control = 1; unsigned int rds_iw_sysctl_flow_control = 1;
static ctl_table rds_iw_sysctl_table[] = { static struct ctl_table rds_iw_sysctl_table[] = {
{ {
.procname = "max_send_wr", .procname = "max_send_wr",
.data = &rds_iw_sysctl_max_send_wr, .data = &rds_iw_sysctl_max_send_wr,
......
...@@ -49,7 +49,7 @@ unsigned int rds_sysctl_max_unacked_bytes = (16 << 20); ...@@ -49,7 +49,7 @@ unsigned int rds_sysctl_max_unacked_bytes = (16 << 20);
unsigned int rds_sysctl_ping_enable = 1; unsigned int rds_sysctl_ping_enable = 1;
static ctl_table rds_sysctl_rds_table[] = { static struct ctl_table rds_sysctl_rds_table[] = {
{ {
.procname = "reconnect_min_delay_ms", .procname = "reconnect_min_delay_ms",
.data = &rds_sysctl_reconnect_min_jiffies, .data = &rds_sysctl_reconnect_min_jiffies,
......
...@@ -24,7 +24,7 @@ static int min_window[] = {1}, max_window[] = {7}; ...@@ -24,7 +24,7 @@ static int min_window[] = {1}, max_window[] = {7};
static struct ctl_table_header *rose_table_header; static struct ctl_table_header *rose_table_header;
static ctl_table rose_table[] = { static struct ctl_table rose_table[] = {
{ {
.procname = "restart_request_timeout", .procname = "restart_request_timeout",
.data = &sysctl_rose_restart_request_timeout, .data = &sysctl_rose_restart_request_timeout,
......
...@@ -62,12 +62,12 @@ extern long sysctl_sctp_mem[3]; ...@@ -62,12 +62,12 @@ extern long sysctl_sctp_mem[3];
extern int sysctl_sctp_rmem[3]; extern int sysctl_sctp_rmem[3];
extern int sysctl_sctp_wmem[3]; extern int sysctl_sctp_wmem[3];
static int proc_sctp_do_hmac_alg(ctl_table *ctl, static int proc_sctp_do_hmac_alg(struct ctl_table *ctl,
int write, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos); loff_t *ppos);
static ctl_table sctp_table[] = { static struct ctl_table sctp_table[] = {
{ {
.procname = "sctp_mem", .procname = "sctp_mem",
.data = &sysctl_sctp_mem, .data = &sysctl_sctp_mem,
...@@ -93,7 +93,7 @@ static ctl_table sctp_table[] = { ...@@ -93,7 +93,7 @@ static ctl_table sctp_table[] = {
{ /* sentinel */ } { /* sentinel */ }
}; };
static ctl_table sctp_net_table[] = { static struct ctl_table sctp_net_table[] = {
{ {
.procname = "rto_initial", .procname = "rto_initial",
.data = &init_net.sctp.rto_initial, .data = &init_net.sctp.rto_initial,
...@@ -300,14 +300,14 @@ static ctl_table sctp_net_table[] = { ...@@ -300,14 +300,14 @@ static ctl_table sctp_net_table[] = {
{ /* sentinel */ } { /* sentinel */ }
}; };
static int proc_sctp_do_hmac_alg(ctl_table *ctl, static int proc_sctp_do_hmac_alg(struct ctl_table *ctl,
int write, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
struct net *net = current->nsproxy->net_ns; struct net *net = current->nsproxy->net_ns;
char tmp[8]; char tmp[8];
ctl_table tbl; struct ctl_table tbl;
int ret; int ret;
int changed = 0; int changed = 0;
char *none = "none"; char *none = "none";
......
...@@ -40,7 +40,7 @@ EXPORT_SYMBOL_GPL(nlm_debug); ...@@ -40,7 +40,7 @@ EXPORT_SYMBOL_GPL(nlm_debug);
#ifdef RPC_DEBUG #ifdef RPC_DEBUG
static struct ctl_table_header *sunrpc_table_header; static struct ctl_table_header *sunrpc_table_header;
static ctl_table sunrpc_table[]; static struct ctl_table sunrpc_table[];
void void
rpc_register_sysctl(void) rpc_register_sysctl(void)
...@@ -58,7 +58,7 @@ rpc_unregister_sysctl(void) ...@@ -58,7 +58,7 @@ rpc_unregister_sysctl(void)
} }
} }
static int proc_do_xprt(ctl_table *table, int write, static int proc_do_xprt(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
char tmpbuf[256]; char tmpbuf[256];
...@@ -73,7 +73,7 @@ static int proc_do_xprt(ctl_table *table, int write, ...@@ -73,7 +73,7 @@ static int proc_do_xprt(ctl_table *table, int write,
} }
static int static int
proc_dodebug(ctl_table *table, int write, proc_dodebug(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
char tmpbuf[20], c, *s; char tmpbuf[20], c, *s;
...@@ -135,7 +135,7 @@ proc_dodebug(ctl_table *table, int write, ...@@ -135,7 +135,7 @@ proc_dodebug(ctl_table *table, int write,
} }
static ctl_table debug_table[] = { static struct ctl_table debug_table[] = {
{ {
.procname = "rpc_debug", .procname = "rpc_debug",
.data = &rpc_debug, .data = &rpc_debug,
...@@ -173,7 +173,7 @@ static ctl_table debug_table[] = { ...@@ -173,7 +173,7 @@ static ctl_table debug_table[] = {
{ } { }
}; };
static ctl_table sunrpc_table[] = { static struct ctl_table sunrpc_table[] = {
{ {
.procname = "sunrpc", .procname = "sunrpc",
.mode = 0555, .mode = 0555,
......
...@@ -84,7 +84,7 @@ struct workqueue_struct *svc_rdma_wq; ...@@ -84,7 +84,7 @@ struct workqueue_struct *svc_rdma_wq;
* resets the associated statistic to zero. Any read returns it's * resets the associated statistic to zero. Any read returns it's
* current value. * current value.
*/ */
static int read_reset_stat(ctl_table *table, int write, static int read_reset_stat(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
{ {
...@@ -119,7 +119,7 @@ static int read_reset_stat(ctl_table *table, int write, ...@@ -119,7 +119,7 @@ static int read_reset_stat(ctl_table *table, int write,
} }
static struct ctl_table_header *svcrdma_table_header; static struct ctl_table_header *svcrdma_table_header;
static ctl_table svcrdma_parm_table[] = { static struct ctl_table svcrdma_parm_table[] = {
{ {
.procname = "max_requests", .procname = "max_requests",
.data = &svcrdma_max_requests, .data = &svcrdma_max_requests,
...@@ -214,7 +214,7 @@ static ctl_table svcrdma_parm_table[] = { ...@@ -214,7 +214,7 @@ static ctl_table svcrdma_parm_table[] = {
{ }, { },
}; };
static ctl_table svcrdma_table[] = { static struct ctl_table svcrdma_table[] = {
{ {
.procname = "svc_rdma", .procname = "svc_rdma",
.mode = 0555, .mode = 0555,
...@@ -223,7 +223,7 @@ static ctl_table svcrdma_table[] = { ...@@ -223,7 +223,7 @@ static ctl_table svcrdma_table[] = {
{ }, { },
}; };
static ctl_table svcrdma_root_table[] = { static struct ctl_table svcrdma_root_table[] = {
{ {
.procname = "sunrpc", .procname = "sunrpc",
.mode = 0555, .mode = 0555,
......
...@@ -86,7 +86,7 @@ static unsigned int max_memreg = RPCRDMA_LAST - 1; ...@@ -86,7 +86,7 @@ static unsigned int max_memreg = RPCRDMA_LAST - 1;
static struct ctl_table_header *sunrpc_table_header; static struct ctl_table_header *sunrpc_table_header;
static ctl_table xr_tunables_table[] = { static struct ctl_table xr_tunables_table[] = {
{ {
.procname = "rdma_slot_table_entries", .procname = "rdma_slot_table_entries",
.data = &xprt_rdma_slot_table_entries, .data = &xprt_rdma_slot_table_entries,
...@@ -138,7 +138,7 @@ static ctl_table xr_tunables_table[] = { ...@@ -138,7 +138,7 @@ static ctl_table xr_tunables_table[] = {
{ }, { },
}; };
static ctl_table sunrpc_table[] = { static struct ctl_table sunrpc_table[] = {
{ {
.procname = "sunrpc", .procname = "sunrpc",
.mode = 0555, .mode = 0555,
......
...@@ -87,7 +87,7 @@ static struct ctl_table_header *sunrpc_table_header; ...@@ -87,7 +87,7 @@ static struct ctl_table_header *sunrpc_table_header;
* FIXME: changing the UDP slot table size should also resize the UDP * FIXME: changing the UDP slot table size should also resize the UDP
* socket buffers for existing UDP transports * socket buffers for existing UDP transports
*/ */
static ctl_table xs_tunables_table[] = { static struct ctl_table xs_tunables_table[] = {
{ {
.procname = "udp_slot_table_entries", .procname = "udp_slot_table_entries",
.data = &xprt_udp_slot_table_entries, .data = &xprt_udp_slot_table_entries,
...@@ -143,7 +143,7 @@ static ctl_table xs_tunables_table[] = { ...@@ -143,7 +143,7 @@ static ctl_table xs_tunables_table[] = {
{ }, { },
}; };
static ctl_table sunrpc_table[] = { static struct ctl_table sunrpc_table[] = {
{ {
.procname = "sunrpc", .procname = "sunrpc",
.mode = 0555, .mode = 0555,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <net/af_unix.h> #include <net/af_unix.h>
static ctl_table unix_table[] = { static struct ctl_table unix_table[] = {
{ {
.procname = "max_dgram_qlen", .procname = "max_dgram_qlen",
.data = &init_net.unx.sysctl_max_dgram_qlen, .data = &init_net.unx.sysctl_max_dgram_qlen,
......
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