Skip to content

Commit

Permalink
module: fix warning of unused function when !CONFIG_PROC_FS
Browse files Browse the repository at this point in the history
Fix this warning:
kernel/module.c:824: warning: ‘print_unload_info’ defined but not used
print_unload_info() just was used when CONFIG_PROC_FS was defined.
This patch mark print_unload_info() inline to solve the problem.

Signed-off-by: Jianjun Kong <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
CC: Ingo Molnar <[email protected]>
CC: Américo Wang <[email protected]>
  • Loading branch information
Jianjun Kong authored and rustyrussell committed Jan 4, 2009
1 parent ca4787b commit d1e99d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ sys_delete_module(const char __user *name_user, unsigned int flags)
return ret;
}

static void print_unload_info(struct seq_file *m, struct module *mod)
static inline void print_unload_info(struct seq_file *m, struct module *mod)
{
struct module_use *use;
int printed_something = 0;
Expand Down Expand Up @@ -893,7 +893,7 @@ void module_put(struct module *module)
EXPORT_SYMBOL(module_put);

#else /* !CONFIG_MODULE_UNLOAD */
static void print_unload_info(struct seq_file *m, struct module *mod)
static inline void print_unload_info(struct seq_file *m, struct module *mod)
{
/* We don't know the usage count, or what modules are using. */
seq_printf(m, " - -");
Expand Down

0 comments on commit d1e99d7

Please sign in to comment.