Commit 554588e8 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Luis Chamberlain

sysctl: fix unused proc_cap_handler() function warning

Since usermodehelper_table() is marked static now, we get a
warning about it being unused when SYSCTL is disabled:

kernel/umh.c:497:12: error: 'proc_cap_handler' defined but not used [-Werror=unused-function]

Just move it inside of the same #ifdef.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Tested-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Fixes: 861dc0b4 ("sysctl: move umh sysctl registration to its own file")
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
[mcgrof: adjust new commit ID for Fixes tag]
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent c6b02710
...@@ -494,6 +494,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait) ...@@ -494,6 +494,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
} }
EXPORT_SYMBOL(call_usermodehelper); EXPORT_SYMBOL(call_usermodehelper);
#if defined(CONFIG_SYSCTL)
static int proc_cap_handler(struct ctl_table *table, int write, static int proc_cap_handler(struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos) void *buffer, size_t *lenp, loff_t *ppos)
{ {
...@@ -544,7 +545,6 @@ static int proc_cap_handler(struct ctl_table *table, int write, ...@@ -544,7 +545,6 @@ static int proc_cap_handler(struct ctl_table *table, int write,
return 0; return 0;
} }
#if defined(CONFIG_SYSCTL)
static struct ctl_table usermodehelper_table[] = { static struct ctl_table usermodehelper_table[] = {
{ {
.procname = "bset", .procname = "bset",
......
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