diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2017-09-08 19:17:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-08 21:26:51 -0400 |
commit | 0ce2c2029312ed78e37b56b08fa0f59ba97ef50b (patch) | |
tree | ddcf426279722e7d4dabc143365fca8cd1791fd8 | |
parent | c1f3fa2a4fde2818623b42e3f749bd478be5dec7 (diff) |
kmod: move #ifdef CONFIG_MODULES wrapper to Makefile
The entire file is now conditionally compiled only when CONFIG_MODULES is
enabled, and this this is a bool. Just move this conditional to the
Makefile as its easier to read this way.
Link: http://lkml.kernel.org/r/20170810180618.22457-5-mcgrof@kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jessica Yu <jeyu@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michal Marek <mmarek@suse.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Daniel Mentz <danielmentz@google.com>
Cc: David Binderman <dcb314@hotmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/Makefile | 3 | ||||
-rw-r--r-- | kernel/kmod.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 44abbb0104b6..ed470aac53da 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
@@ -5,12 +5,13 @@ | |||
5 | obj-y = fork.o exec_domain.o panic.o \ | 5 | obj-y = fork.o exec_domain.o panic.o \ |
6 | cpu.o exit.o softirq.o resource.o \ | 6 | cpu.o exit.o softirq.o resource.o \ |
7 | sysctl.o sysctl_binary.o capability.o ptrace.o user.o \ | 7 | sysctl.o sysctl_binary.o capability.o ptrace.o user.o \ |
8 | signal.o sys.o umh.o kmod.o workqueue.o pid.o task_work.o \ | 8 | signal.o sys.o umh.o workqueue.o pid.o task_work.o \ |
9 | extable.o params.o \ | 9 | extable.o params.o \ |
10 | kthread.o sys_ni.o nsproxy.o \ | 10 | kthread.o sys_ni.o nsproxy.o \ |
11 | notifier.o ksysfs.o cred.o reboot.o \ | 11 | notifier.o ksysfs.o cred.o reboot.o \ |
12 | async.o range.o smpboot.o ucount.o | 12 | async.o range.o smpboot.o ucount.o |
13 | 13 | ||
14 | obj-$(CONFIG_MODULES) += kmod.o | ||
14 | obj-$(CONFIG_MULTIUSER) += groups.o | 15 | obj-$(CONFIG_MULTIUSER) += groups.o |
15 | 16 | ||
16 | ifdef CONFIG_FUNCTION_TRACER | 17 | ifdef CONFIG_FUNCTION_TRACER |
diff --git a/kernel/kmod.c b/kernel/kmod.c index cdff52974d18..bc6addd9152b 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <trace/events/module.h> | 29 | #include <trace/events/module.h> |
30 | 30 | ||
31 | #ifdef CONFIG_MODULES | ||
32 | /* | 31 | /* |
33 | * Assuming: | 32 | * Assuming: |
34 | * | 33 | * |
@@ -177,5 +176,3 @@ int __request_module(bool wait, const char *fmt, ...) | |||
177 | return ret; | 176 | return ret; |
178 | } | 177 | } |
179 | EXPORT_SYMBOL(__request_module); | 178 | EXPORT_SYMBOL(__request_module); |
180 | |||
181 | #endif /* CONFIG_MODULES */ | ||