]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
printk/index: Fix warning about missing prototypes
authorPetr Mladek <pmladek@suse.com>
Fri, 23 Jul 2021 07:47:07 +0000 (09:47 +0200)
committerPetr Mladek <pmladek@suse.com>
Mon, 26 Jul 2021 10:35:56 +0000 (12:35 +0200)
The commit 337015573718b161 ("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: 337015573718b161 ("printk: Userspace format indexing support")
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Chris Down <chris@chrisdown.name>
[pmladek@suse.com: Let the compiler decide about inlining.]
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/lkml/YPql089IwSpudw%2F1@alley/
kernel/printk/index.c

index ca062f5e177946014e48e59fb6906076cc313ccf..58d27272f992fc9aabb894edfccdbbf5d277a5ee 100644 (file)
@@ -137,13 +137,13 @@ static const char *pi_get_module_name(struct module *mod)
 }
 #endif
 
-void pi_create_file(struct module *mod)
+static void pi_create_file(struct module *mod)
 {
        debugfs_create_file(pi_get_module_name(mod), 0444, dfs_index,
                                       mod, &dfs_index_fops);
 }
 
-void pi_remove_file(struct module *mod)
+static void pi_remove_file(struct module *mod)
 {
        debugfs_remove(debugfs_lookup(pi_get_module_name(mod), dfs_index));
 }