[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210804130105.18732-1-yuehaibing@huawei.com>
Date: Wed, 4 Aug 2021 21:01:05 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <chris@...isdown.name>, <pmladek@...e.com>,
<senozhatsky@...omium.org>, <rostedt@...dmis.org>,
<john.ogness@...utronix.de>
CC: <linux-kernel@...r.kernel.org>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] printk/index: Fix -Wunused-function warning
If CONFIG_MODULES is n, we got this:
kernel/printk/index.c:146:13: warning: ‘pi_remove_file’ defined but not used [-Wunused-function]
Move it inside #ifdef block to fix this warning.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
kernel/printk/index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/printk/index.c b/kernel/printk/index.c
index 58d27272f992..d3709408debe 100644
--- a/kernel/printk/index.c
+++ b/kernel/printk/index.c
@@ -143,12 +143,12 @@ static void pi_create_file(struct module *mod)
mod, &dfs_index_fops);
}
+#ifdef CONFIG_MODULES
static void pi_remove_file(struct module *mod)
{
debugfs_remove(debugfs_lookup(pi_get_module_name(mod), dfs_index));
}
-#ifdef CONFIG_MODULES
static int pi_module_notify(struct notifier_block *nb, unsigned long op,
void *data)
{
--
2.17.1
Powered by blists - more mailing lists