From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbdHJSG1 (ORCPT ); Thu, 10 Aug 2017 14:06:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:53882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776AbdHJSGZ (ORCPT ); Thu, 10 Aug 2017 14:06:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E06D22C92 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mcgrof@kernel.org From: "Luis R. Rodriguez" 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" Subject: [PATCH 4/4] kmod: move #ifdef CONFIG_MODULES wrapper to Makefile Date: Thu, 10 Aug 2017 11:06:18 -0700 Message-Id: <20170810180618.22457-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170810180618.22457-1-mcgrof@kernel.org> References: <20170810180618.22457-1-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.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 --- 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 -#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