From: Masahiro Yamada <masahiroy@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>
Subject: [RESEND PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile
Date: Mon, 27 Sep 2021 23:00:00 +0900 [thread overview]
Message-ID: <20210927140000.866249-5-masahiroy@kernel.org> (raw)
In-Reply-To: <20210927140000.866249-1-masahiroy@kernel.org>
Every object under block/ depends on CONFIG_BLOCK.
Move the guard to the top Makefile since there is no point to
descend into block/ if CONFIG_BLOCK=n.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 3 ++-
block/Makefile | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 60923c2f41d5..0bcaa9e30fdf 100644
--- a/Makefile
+++ b/Makefile
@@ -1115,7 +1115,8 @@ export MODORDER := $(extmod_prefix)modules.order
export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps
ifeq ($(KBUILD_EXTMOD),)
-core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
+core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/
+core-$(CONFIG_BLOCK) += block/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
diff --git a/block/Makefile b/block/Makefile
index 41aa1ba69c90..74df168729ec 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -3,7 +3,7 @@
# Makefile for the kernel block layer
#
-obj-$(CONFIG_BLOCK) := bdev.o fops.o bio.o elevator.o blk-core.o blk-sysfs.o \
+obj-y := bdev.o fops.o bio.o elevator.o blk-core.o blk-sysfs.o \
blk-flush.o blk-settings.o blk-ioc.o blk-map.o \
blk-exec.o blk-merge.o blk-timeout.o \
blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
--
2.30.2
next prev parent reply other threads:[~2021-09-27 14:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 13:59 [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Masahiro Yamada
2021-09-27 13:59 ` [RESEND PATCH 1/4] block: remove redundant =y from BLK_CGROUP dependency Masahiro Yamada
2021-09-27 13:59 ` [RESEND PATCH 2/4] block: simplify Kconfig files Masahiro Yamada
2021-09-27 13:59 ` [RESEND PATCH 3/4] block: move menu "Partition type" to block/partitions/Kconfig Masahiro Yamada
2021-09-27 14:00 ` Masahiro Yamada [this message]
2021-09-28 5:24 ` [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Christoph Hellwig
2021-10-16 8:51 ` Masahiro Yamada
2021-10-16 22:10 ` Jens Axboe
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=20210927140000.866249-5-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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