Skip to content

Commit 554588e

Browse files
arndbmcgrof
authored andcommitted
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: Arnd Bergmann <[email protected]> Tested-by: Matthieu Baerts <[email protected]> Fixes: 861dc0b ("sysctl: move umh sysctl registration to its own file") Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested [mcgrof: adjust new commit ID for Fixes tag] Signed-off-by: Luis Chamberlain <[email protected]>
1 parent c6b0271 commit 554588e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/umh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
494494
}
495495
EXPORT_SYMBOL(call_usermodehelper);
496496

497+
#if defined(CONFIG_SYSCTL)
497498
static int proc_cap_handler(struct ctl_table *table, int write,
498499
void *buffer, size_t *lenp, loff_t *ppos)
499500
{
@@ -544,7 +545,6 @@ static int proc_cap_handler(struct ctl_table *table, int write,
544545
return 0;
545546
}
546547

547-
#if defined(CONFIG_SYSCTL)
548548
static struct ctl_table usermodehelper_table[] = {
549549
{
550550
.procname = "bset",

0 commit comments

Comments
 (0)