Commit d2441183dc222d12961ff2201f5086c846505d93

Authored by Linus Torvalds
1 parent 88ed86fee6

Fix compile warning in kernel/params.c

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -510,6 +510,7 @@
510 510 return err;
511 511 }
512 512  
  513 +#ifdef CONFIG_MODULES
513 514 static void free_module_param_attrs(struct module_kobject *mk)
514 515 {
515 516 kfree(mk->mp->grp.attrs);
... ... @@ -517,7 +518,6 @@
517 518 mk->mp = NULL;
518 519 }
519 520  
520   -#ifdef CONFIG_MODULES
521 521 /*
522 522 * module_param_sysfs_setup - setup sysfs support for one module
523 523 * @mod: module