Skip to content

Commit

Permalink
Fix compile warning in kernel/params.c
Browse files Browse the repository at this point in the history
Move free_module_param_attrs() into the CONFIG_MODULES section, since
it's only used inside there. Thus avoiding the warning

  kernel/params.c:514: warning: 'free_module_param_attrs' defined but not used

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Oct 23, 2008
1 parent 88ed86f commit d244118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,14 @@ static __modinit int add_sysfs_param(struct module_kobject *mk,
return err;
}

#ifdef CONFIG_MODULES
static void free_module_param_attrs(struct module_kobject *mk)
{
kfree(mk->mp->grp.attrs);
kfree(mk->mp);
mk->mp = NULL;
}

#ifdef CONFIG_MODULES
/*
* module_param_sysfs_setup - setup sysfs support for one module
* @mod: module
Expand Down

0 comments on commit d244118

Please sign in to comment.