linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: akpm@linux-foundation.org
Cc: keescook@chromium.org, dmitry.torokhov@gmail.com,
	jeyu@redhat.com, rusty@rustcorp.com.au, mmarek@suse.com,
	pmladek@suse.com, mbenes@suse.cz, jpoimboe@redhat.com,
	linux@roeck-us.net, ebiederm@xmission.com,
	matt.redfearn@imgtec.com, dan.carpenter@oracle.com,
	colin.king@canonical.com, danielmentz@google.com,
	dcb314@hotmail.com, gregkh@linuxfoundation.org,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@kernel.org>
Subject: [PATCH 4/4] kmod: move #ifdef CONFIG_MODULES wrapper to Makefile
Date: Thu, 10 Aug 2017 11:06:18 -0700	[thread overview]
Message-ID: <20170810180618.22457-5-mcgrof@kernel.org> (raw)
In-Reply-To: <20170810180618.22457-1-mcgrof@kernel.org>

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.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 kernel/Makefile | 3 ++-
 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 @@
 obj-y     = fork.o exec_domain.o panic.o \
 	    cpu.o exit.o softirq.o resource.o \
 	    sysctl.o sysctl_binary.o capability.o ptrace.o user.o \
-	    signal.o sys.o umh.o kmod.o workqueue.o pid.o task_work.o \
+	    signal.o sys.o umh.o workqueue.o pid.o task_work.o \
 	    extable.o params.o \
 	    kthread.o sys_ni.o nsproxy.o \
 	    notifier.o ksysfs.o cred.o reboot.o \
 	    async.o range.o smpboot.o ucount.o
 
+obj-$(CONFIG_MODULES) += kmod.o
 obj-$(CONFIG_MULTIUSER) += groups.o
 
 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 @@
 
 #include <trace/events/module.h>
 
-#ifdef CONFIG_MODULES
 /*
  * Assuming:
  *
@@ -177,5 +176,3 @@ int __request_module(bool wait, const char *fmt, ...)
 	return ret;
 }
 EXPORT_SYMBOL(__request_module);
-
-#endif /* CONFIG_MODULES */
-- 
2.14.0

      parent reply	other threads:[~2017-08-10 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 18:06 [PATCH 0/4] kmod: few code cleanups to split out umh code Luis R. Rodriguez
2017-08-10 18:06 ` [PATCH 1/4] kmod: split out umh code into its own file Luis R. Rodriguez
2017-08-10 18:06 ` [PATCH 2/4] MAINTAINERS: clarify kmod is just a kernel module loader Luis R. Rodriguez
2017-08-10 18:06 ` [PATCH 3/4] kmod: split off umh headers into its own file Luis R. Rodriguez
2017-08-10 18:06 ` Luis R. Rodriguez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170810180618.22457-5-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=danielmentz@google.com \
    --cc=dcb314@hotmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeyu@redhat.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=matt.redfearn@imgtec.com \
    --cc=mbenes@suse.cz \
    --cc=mmarek@suse.com \
    --cc=pmladek@suse.com \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).