diff options
author | Joe Perches <joe@perches.com> | 2013-06-12 02:04:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-13 05:36:09 -0400 |
commit | fe2c6338fd2c6f383c4d4164262f35c8f3708e1f (patch) | |
tree | 491431ce95f0bda453b054748e3552fa6450c21c /net/core | |
parent | 194f4a6df2a92c3d0bc65a85facfbc2433b25d06 (diff) |
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: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 6 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5c56b217b999..decaa4b9db2f 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2765,11 +2765,11 @@ EXPORT_SYMBOL(neigh_app_ns); | |||
2765 | static int zero; | 2765 | static int zero; |
2766 | static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); | 2766 | static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); |
2767 | 2767 | ||
2768 | static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer, | 2768 | static int proc_unres_qlen(struct ctl_table *ctl, int write, |
2769 | size_t *lenp, loff_t *ppos) | 2769 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2770 | { | 2770 | { |
2771 | int size, ret; | 2771 | int size, ret; |
2772 | ctl_table tmp = *ctl; | 2772 | struct ctl_table tmp = *ctl; |
2773 | 2773 | ||
2774 | tmp.extra1 = &zero; | 2774 | tmp.extra1 = &zero; |
2775 | tmp.extra2 = &unres_qlen_max; | 2775 | tmp.extra2 = &unres_qlen_max; |
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 4b48f39582b0..637a42e5d589 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -24,12 +24,12 @@ | |||
24 | static int one = 1; | 24 | static int one = 1; |
25 | 25 | ||
26 | #ifdef CONFIG_RPS | 26 | #ifdef CONFIG_RPS |
27 | static int rps_sock_flow_sysctl(ctl_table *table, int write, | 27 | static int rps_sock_flow_sysctl(struct ctl_table *table, int write, |
28 | void __user *buffer, size_t *lenp, loff_t *ppos) | 28 | void __user *buffer, size_t *lenp, loff_t *ppos) |
29 | { | 29 | { |
30 | unsigned int orig_size, size; | 30 | unsigned int orig_size, size; |
31 | int ret, i; | 31 | int ret, i; |
32 | ctl_table tmp = { | 32 | struct ctl_table tmp = { |
33 | .data = &size, | 33 | .data = &size, |
34 | .maxlen = sizeof(size), | 34 | .maxlen = sizeof(size), |
35 | .mode = table->mode | 35 | .mode = table->mode |
@@ -91,7 +91,7 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write, | |||
91 | #ifdef CONFIG_NET_FLOW_LIMIT | 91 | #ifdef CONFIG_NET_FLOW_LIMIT |
92 | static DEFINE_MUTEX(flow_limit_update_mutex); | 92 | static DEFINE_MUTEX(flow_limit_update_mutex); |
93 | 93 | ||
94 | static int flow_limit_cpu_sysctl(ctl_table *table, int write, | 94 | static int flow_limit_cpu_sysctl(struct ctl_table *table, int write, |
95 | void __user *buffer, size_t *lenp, | 95 | void __user *buffer, size_t *lenp, |
96 | loff_t *ppos) | 96 | loff_t *ppos) |
97 | { | 97 | { |
@@ -156,7 +156,7 @@ done: | |||
156 | return ret; | 156 | return ret; |
157 | } | 157 | } |
158 | 158 | ||
159 | static int flow_limit_table_len_sysctl(ctl_table *table, int write, | 159 | static int flow_limit_table_len_sysctl(struct ctl_table *table, int write, |
160 | void __user *buffer, size_t *lenp, | 160 | void __user *buffer, size_t *lenp, |
161 | loff_t *ppos) | 161 | loff_t *ppos) |
162 | { | 162 | { |