From: Matteo Rizzo <matteorizzo@google.com>
To: jarkko@kernel.org, mcgrof@kernel.org, linux-kernel@vger.kernel.org
Cc: Matteo Rizzo <matteorizzo@google.com>
Subject: [PATCH] umh: fix build warning with CONFIG_SYSCTL disabled
Date: Thu, 29 Jun 2023 16:10:44 +0000 [thread overview]
Message-ID: <20230629161044.1995505-1-matteorizzo@google.com> (raw)
When CONFIG_SYSCTL is not defined proc_cap_handler is not used. This
causes a build warning with -Wunused-function.
kernel/umh.c:497:12: error: unused function 'proc_cap_handler'
[-Werror,-Wunused-function]
static int proc_cap_handler(struct ctl_table *table, int write,
^
1 error generated.
Fixes: 861dc0b46432 ("sysctl: move umh sysctl registration to its own file")
Signed-off-by: Matteo Rizzo <matteorizzo@google.com>
---
kernel/umh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/umh.c b/kernel/umh.c
index 41088c5c39fd..1b13c5d34624 100644
--- a/kernel/umh.c
+++ b/kernel/umh.c
@@ -494,6 +494,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
}
EXPORT_SYMBOL(call_usermodehelper);
+#if defined(CONFIG_SYSCTL)
static int proc_cap_handler(struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
@@ -544,7 +545,6 @@ static int proc_cap_handler(struct ctl_table *table, int write,
return 0;
}
-#if defined(CONFIG_SYSCTL)
static struct ctl_table usermodehelper_table[] = {
{
.procname = "bset",
--
2.41.0.162.gfafddb0af9-goog
next reply other threads:[~2023-06-29 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 16:10 Matteo Rizzo [this message]
2023-06-29 16:20 ` Randy Dunlap
2023-06-29 17:10 ` Matteo Rizzo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230629161044.1995505-1-matteorizzo@google.com \
--to=matteorizzo@google.com \
--cc=jarkko@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®