[tip:warnings/complex] modules: Restrict definition of a label in kernel/module.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  67f5ca081c6ace125e8ccc76b8a7d99b091abaa7
Gitweb:     http://git.kernel.org/tip/67f5ca081c6ace125e8ccc76b8a7d99b091abaa7
Author:     Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxxx>
AuthorDate: Wed, 18 Mar 2009 23:49:26 +0200
Committer:  Ingo Molnar <mingo@xxxxxxx>
CommitDate: Thu, 19 Mar 2009 08:26:56 +0100

modules: Restrict definition of a label in kernel/module.c

Impact: cleanup

In function 'load_module' in kernel/module.c, the label 'free_init'
is used if and only if both CONFIG_MODULE_UNLOAD and CONFIG_SMP are
defined. However, the label itself is defined unconditionally,
which may produce the following warning:

kernel/module.c:2291: warning: label 'free_init' defined but not used

This patch fixes the warning by moving the label definition under an
appropriate preprocessor construct.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxxx>
Cc: akpm@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
 kernel/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 1196f5d..df00a1b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2288,8 +2288,8 @@ static noinline struct module *load_module(void __user *umod,
 	ftrace_release(mod->module_core, mod->core_size);
  free_unload:
 	module_unload_free(mod);
- free_init:
 #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP)
+ free_init:
 	percpu_modfree(mod->refptr);
 #endif
 	module_free(mod, mod->module_init);
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux