Skip to content

Commit bc17bed

Browse files
YueHaibingpmladek
authored andcommitted
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 <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7d9e266 commit bc17bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/printk/index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ static void pi_create_file(struct module *mod)
143143
mod, &dfs_index_fops);
144144
}
145145

146+
#ifdef CONFIG_MODULES
146147
static void pi_remove_file(struct module *mod)
147148
{
148149
debugfs_remove(debugfs_lookup(pi_get_module_name(mod), dfs_index));
149150
}
150151

151-
#ifdef CONFIG_MODULES
152152
static int pi_module_notify(struct notifier_block *nb, unsigned long op,
153153
void *data)
154154
{

0 commit comments

Comments
 (0)