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/sunrpc | |
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/sunrpc')
-rw-r--r-- | net/sunrpc/sysctl.c | 10 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma.c | 8 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index af7d339add9d..c99c58e2ee66 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -40,7 +40,7 @@ EXPORT_SYMBOL_GPL(nlm_debug); | |||
40 | #ifdef RPC_DEBUG | 40 | #ifdef RPC_DEBUG |
41 | 41 | ||
42 | static struct ctl_table_header *sunrpc_table_header; | 42 | static struct ctl_table_header *sunrpc_table_header; |
43 | static ctl_table sunrpc_table[]; | 43 | static struct ctl_table sunrpc_table[]; |
44 | 44 | ||
45 | void | 45 | void |
46 | rpc_register_sysctl(void) | 46 | rpc_register_sysctl(void) |
@@ -58,7 +58,7 @@ rpc_unregister_sysctl(void) | |||
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | static int proc_do_xprt(ctl_table *table, int write, | 61 | static int proc_do_xprt(struct ctl_table *table, int write, |
62 | void __user *buffer, size_t *lenp, loff_t *ppos) | 62 | void __user *buffer, size_t *lenp, loff_t *ppos) |
63 | { | 63 | { |
64 | char tmpbuf[256]; | 64 | char tmpbuf[256]; |
@@ -73,7 +73,7 @@ static int proc_do_xprt(ctl_table *table, int write, | |||
73 | } | 73 | } |
74 | 74 | ||
75 | static int | 75 | static int |
76 | proc_dodebug(ctl_table *table, int write, | 76 | proc_dodebug(struct ctl_table *table, int write, |
77 | void __user *buffer, size_t *lenp, loff_t *ppos) | 77 | void __user *buffer, size_t *lenp, loff_t *ppos) |
78 | { | 78 | { |
79 | char tmpbuf[20], c, *s; | 79 | char tmpbuf[20], c, *s; |
@@ -135,7 +135,7 @@ done: | |||
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
138 | static ctl_table debug_table[] = { | 138 | static struct ctl_table debug_table[] = { |
139 | { | 139 | { |
140 | .procname = "rpc_debug", | 140 | .procname = "rpc_debug", |
141 | .data = &rpc_debug, | 141 | .data = &rpc_debug, |
@@ -173,7 +173,7 @@ static ctl_table debug_table[] = { | |||
173 | { } | 173 | { } |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static ctl_table sunrpc_table[] = { | 176 | static struct ctl_table sunrpc_table[] = { |
177 | { | 177 | { |
178 | .procname = "sunrpc", | 178 | .procname = "sunrpc", |
179 | .mode = 0555, | 179 | .mode = 0555, |
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index 8343737e85f4..c1b6270262c2 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c | |||
@@ -84,7 +84,7 @@ struct workqueue_struct *svc_rdma_wq; | |||
84 | * resets the associated statistic to zero. Any read returns it's | 84 | * resets the associated statistic to zero. Any read returns it's |
85 | * current value. | 85 | * current value. |
86 | */ | 86 | */ |
87 | static int read_reset_stat(ctl_table *table, int write, | 87 | static int read_reset_stat(struct ctl_table *table, int write, |
88 | void __user *buffer, size_t *lenp, | 88 | void __user *buffer, size_t *lenp, |
89 | loff_t *ppos) | 89 | loff_t *ppos) |
90 | { | 90 | { |
@@ -119,7 +119,7 @@ static int read_reset_stat(ctl_table *table, int write, | |||
119 | } | 119 | } |
120 | 120 | ||
121 | static struct ctl_table_header *svcrdma_table_header; | 121 | static struct ctl_table_header *svcrdma_table_header; |
122 | static ctl_table svcrdma_parm_table[] = { | 122 | static struct ctl_table svcrdma_parm_table[] = { |
123 | { | 123 | { |
124 | .procname = "max_requests", | 124 | .procname = "max_requests", |
125 | .data = &svcrdma_max_requests, | 125 | .data = &svcrdma_max_requests, |
@@ -214,7 +214,7 @@ static ctl_table svcrdma_parm_table[] = { | |||
214 | { }, | 214 | { }, |
215 | }; | 215 | }; |
216 | 216 | ||
217 | static ctl_table svcrdma_table[] = { | 217 | static struct ctl_table svcrdma_table[] = { |
218 | { | 218 | { |
219 | .procname = "svc_rdma", | 219 | .procname = "svc_rdma", |
220 | .mode = 0555, | 220 | .mode = 0555, |
@@ -223,7 +223,7 @@ static ctl_table svcrdma_table[] = { | |||
223 | { }, | 223 | { }, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static ctl_table svcrdma_root_table[] = { | 226 | static struct ctl_table svcrdma_root_table[] = { |
227 | { | 227 | { |
228 | .procname = "sunrpc", | 228 | .procname = "sunrpc", |
229 | .mode = 0555, | 229 | .mode = 0555, |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 794312f22b9b..285dc0884115 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -86,7 +86,7 @@ static unsigned int max_memreg = RPCRDMA_LAST - 1; | |||
86 | 86 | ||
87 | static struct ctl_table_header *sunrpc_table_header; | 87 | static struct ctl_table_header *sunrpc_table_header; |
88 | 88 | ||
89 | static ctl_table xr_tunables_table[] = { | 89 | static struct ctl_table xr_tunables_table[] = { |
90 | { | 90 | { |
91 | .procname = "rdma_slot_table_entries", | 91 | .procname = "rdma_slot_table_entries", |
92 | .data = &xprt_rdma_slot_table_entries, | 92 | .data = &xprt_rdma_slot_table_entries, |
@@ -138,7 +138,7 @@ static ctl_table xr_tunables_table[] = { | |||
138 | { }, | 138 | { }, |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static ctl_table sunrpc_table[] = { | 141 | static struct ctl_table sunrpc_table[] = { |
142 | { | 142 | { |
143 | .procname = "sunrpc", | 143 | .procname = "sunrpc", |
144 | .mode = 0555, | 144 | .mode = 0555, |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index ffd50348a509..412de7cfcc80 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -87,7 +87,7 @@ static struct ctl_table_header *sunrpc_table_header; | |||
87 | * FIXME: changing the UDP slot table size should also resize the UDP | 87 | * FIXME: changing the UDP slot table size should also resize the UDP |
88 | * socket buffers for existing UDP transports | 88 | * socket buffers for existing UDP transports |
89 | */ | 89 | */ |
90 | static ctl_table xs_tunables_table[] = { | 90 | static struct ctl_table xs_tunables_table[] = { |
91 | { | 91 | { |
92 | .procname = "udp_slot_table_entries", | 92 | .procname = "udp_slot_table_entries", |
93 | .data = &xprt_udp_slot_table_entries, | 93 | .data = &xprt_udp_slot_table_entries, |
@@ -143,7 +143,7 @@ static ctl_table xs_tunables_table[] = { | |||
143 | { }, | 143 | { }, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static ctl_table sunrpc_table[] = { | 146 | static struct ctl_table sunrpc_table[] = { |
147 | { | 147 | { |
148 | .procname = "sunrpc", | 148 | .procname = "sunrpc", |
149 | .mode = 0555, | 149 | .mode = 0555, |