Skip to content

Commit 32e356b

Browse files
mcgrofamschuma-ntap
authored andcommitted
sunrpc: move sunrpc_table and proc routines above
No need to do a forward declaration for sunrpc_table, just move the sysctls up as everyone else does it. This will make the next change easier to read. This change produces no functional changes. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent c946cb6 commit 32e356b

1 file changed

Lines changed: 16 additions & 19 deletions

File tree

net/sunrpc/sysctl.c

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,6 @@ EXPORT_SYMBOL_GPL(nlm_debug);
4040

4141
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
4242

43-
static struct ctl_table_header *sunrpc_table_header;
44-
static struct ctl_table sunrpc_table[];
45-
46-
void
47-
rpc_register_sysctl(void)
48-
{
49-
if (!sunrpc_table_header)
50-
sunrpc_table_header = register_sysctl_table(sunrpc_table);
51-
}
52-
53-
void
54-
rpc_unregister_sysctl(void)
55-
{
56-
if (sunrpc_table_header) {
57-
unregister_sysctl_table(sunrpc_table_header);
58-
sunrpc_table_header = NULL;
59-
}
60-
}
61-
6243
static int proc_do_xprt(struct ctl_table *table, int write,
6344
void *buffer, size_t *lenp, loff_t *ppos)
6445
{
@@ -142,6 +123,7 @@ proc_dodebug(struct ctl_table *table, int write, void *buffer, size_t *lenp,
142123
return 0;
143124
}
144125

126+
static struct ctl_table_header *sunrpc_table_header;
145127

146128
static struct ctl_table debug_table[] = {
147129
{
@@ -190,4 +172,19 @@ static struct ctl_table sunrpc_table[] = {
190172
{ }
191173
};
192174

175+
void
176+
rpc_register_sysctl(void)
177+
{
178+
if (!sunrpc_table_header)
179+
sunrpc_table_header = register_sysctl_table(sunrpc_table);
180+
}
181+
182+
void
183+
rpc_unregister_sysctl(void)
184+
{
185+
if (sunrpc_table_header) {
186+
unregister_sysctl_table(sunrpc_table_header);
187+
sunrpc_table_header = NULL;
188+
}
189+
}
193190
#endif

0 commit comments

Comments
 (0)