Skip to content

Commit 0f0aa84

Browse files
committed
printk/index: Fix warning about missing prototypes
The commit 3370155 ("printk: Userspace format indexing support") triggered the following build failure: kernel/printk/index.c:140:6: warning: no previous prototype for ‘pi_create_file’ [-Wmissing-prototypes] void pi_create_file(struct module *mod) ^~~~~~~~~~~~~~ kernel/printk/index.c:146:6: warning: no previous prototype for ‘pi_remove_file’ [-Wmissing-prototypes] void pi_remove_file(struct module *mod) ^~~~~~~~~~~~~~ Fixes: 3370155 ("printk: Userspace format indexing support") Reported-by: kernel test robot <[email protected]> Suggested-by: Chris Down <[email protected]> [[email protected]: Let the compiler decide about inlining.] Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/lkml/YPql089IwSpudw%2F1@alley/
1 parent 86ce91d commit 0f0aa84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/printk/index.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ static const char *pi_get_module_name(struct module *mod)
137137
}
138138
#endif
139139

140-
void pi_create_file(struct module *mod)
140+
static void pi_create_file(struct module *mod)
141141
{
142142
debugfs_create_file(pi_get_module_name(mod), 0444, dfs_index,
143143
mod, &dfs_index_fops);
144144
}
145145

146-
void pi_remove_file(struct module *mod)
146+
static void pi_remove_file(struct module *mod)
147147
{
148148
debugfs_remove(debugfs_lookup(pi_get_module_name(mod), dfs_index));
149149
}

0 commit comments

Comments
 (0)