All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 0/4] block: clean up Kconfig and Makefile
@ 2021-09-27 13:59 Masahiro Yamada
  2021-09-27 13:59 ` [RESEND PATCH 1/4] block: remove redundant =y from BLK_CGROUP dependency Masahiro Yamada
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, Masahiro Yamada


This is a resend of
https://lore.kernel.org/linux-block/20210528184435.252924-1-masahiroy@kernel.org/#t



Masahiro Yamada (4):
  block: remove redundant =y from BLK_CGROUP dependency
  block: simplify Kconfig files
  block: move menu "Partition type" to block/partitions/Kconfig
  block: move CONFIG_BLOCK guard to top Makefile

 Makefile                 |  3 ++-
 block/Kconfig            | 28 ++++++++++------------------
 block/Kconfig.iosched    |  4 ----
 block/Makefile           |  2 +-
 block/partitions/Kconfig |  4 ++++
 5 files changed, 17 insertions(+), 24 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [RESEND PATCH 1/4] block: remove redundant =y from BLK_CGROUP dependency
  2021-09-27 13:59 [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Masahiro Yamada
@ 2021-09-27 13:59 ` Masahiro Yamada
  2021-09-27 13:59 ` [RESEND PATCH 2/4] block: simplify Kconfig files Masahiro Yamada
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, Masahiro Yamada

CONFIG_BLK_CGROUP is a boolean option, that is, its value is 'y' or 'n'.
The comparison to 'y' is redundant.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 block/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index 8e28ae7718bd..1d83504749e7 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -73,7 +73,7 @@ config BLK_DEV_ZONED
 
 config BLK_DEV_THROTTLING
 	bool "Block layer bio throttling support"
-	depends on BLK_CGROUP=y
+	depends on BLK_CGROUP
 	select BLK_CGROUP_RWSTAT
 	help
 	Block layer bio throttling support. It can be used to limit
@@ -112,7 +112,7 @@ config BLK_WBT_MQ
 
 config BLK_CGROUP_IOLATENCY
 	bool "Enable support for latency based cgroup IO protection"
-	depends on BLK_CGROUP=y
+	depends on BLK_CGROUP
 	help
 	Enabling this option enables the .latency interface for IO throttling.
 	The IO controller will attempt to maintain average IO latencies below
@@ -132,7 +132,7 @@ config BLK_CGROUP_FC_APPID
 
 config BLK_CGROUP_IOCOST
 	bool "Enable support for cost model based cgroup IO controller"
-	depends on BLK_CGROUP=y
+	depends on BLK_CGROUP
 	select BLK_RQ_IO_DATA_LEN
 	select BLK_RQ_ALLOC_TIME
 	help
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RESEND PATCH 2/4] block: simplify Kconfig files
  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 ` Masahiro Yamada
  2021-09-27 13:59 ` [RESEND PATCH 3/4] block: move menu "Partition type" to block/partitions/Kconfig Masahiro Yamada
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, Masahiro Yamada

Everything under block/ depends on BLOCK. BLOCK_HOLDER_DEPRECATED is
selected from drivers/md/Kconfig, which is entirely dependent on BLOCK.

Extend the 'if BLOCK' ... 'endif' so it covers the whole block/Kconfig.

Also, clean up the definition of BLOCK_COMPAT and BLK_MQ_PCI because
COMPAT and PCI are boolean.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 block/Kconfig         | 18 +++++++-----------
 block/Kconfig.iosched |  4 ----
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index 1d83504749e7..c4d35829ea4f 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -196,33 +196,29 @@ source "block/partitions/Kconfig"
 
 endmenu
 
-endif # BLOCK
-
 config BLOCK_COMPAT
-	bool
-	depends on BLOCK && COMPAT
-	default y
+	def_bool COMPAT
 
 config BLK_MQ_PCI
-	bool
-	depends on BLOCK && PCI
-	default y
+	def_bool PCI
 
 config BLK_MQ_VIRTIO
 	bool
-	depends on BLOCK && VIRTIO
+	depends on VIRTIO
 	default y
 
 config BLK_MQ_RDMA
 	bool
-	depends on BLOCK && INFINIBAND
+	depends on INFINIBAND
 	default y
 
 config BLK_PM
-	def_bool BLOCK && PM
+	def_bool PM
 
 # do not use in new code
 config BLOCK_HOLDER_DEPRECATED
 	bool
 
 source "block/Kconfig.iosched"
+
+endif # BLOCK
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
index 2f2158e05a91..885fee86dfca 100644
--- a/block/Kconfig.iosched
+++ b/block/Kconfig.iosched
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-if BLOCK
-
 menu "IO Schedulers"
 
 config MQ_IOSCHED_DEADLINE
@@ -45,5 +43,3 @@ config BFQ_CGROUP_DEBUG
 	files in a cgroup which can be useful for debugging.
 
 endmenu
-
-endif
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RESEND PATCH 3/4] block: move menu "Partition type" to block/partitions/Kconfig
  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 ` Masahiro Yamada
  2021-09-27 14:00 ` [RESEND PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile Masahiro Yamada
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-09-27 13:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, Masahiro Yamada

Move the menu to the relevant place.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 block/Kconfig            | 4 ----
 block/partitions/Kconfig | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index c4d35829ea4f..c6ce41a5e5b2 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -190,12 +190,8 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
 	  by falling back to the kernel crypto API when inline
 	  encryption hardware is not present.
 
-menu "Partition Types"
-
 source "block/partitions/Kconfig"
 
-endmenu
-
 config BLOCK_COMPAT
 	def_bool COMPAT
 
diff --git a/block/partitions/Kconfig b/block/partitions/Kconfig
index 278593b8e4e9..7aff4eb81c60 100644
--- a/block/partitions/Kconfig
+++ b/block/partitions/Kconfig
@@ -2,6 +2,8 @@
 #
 # Partition configuration
 #
+menu "Partition Types"
+
 config PARTITION_ADVANCED
 	bool "Advanced partition selection"
 	help
@@ -267,3 +269,5 @@ config CMDLINE_PARTITION
 	help
 	  Say Y here if you want to read the partition table from bootargs.
 	  The format for the command line is just like mtdparts.
+
+endmenu
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RESEND PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile
  2021-09-27 13:59 [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Masahiro Yamada
                   ` (2 preceding siblings ...)
  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
  2021-09-28  5:24 ` [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Christoph Hellwig
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-09-27 14:00 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, Masahiro Yamada

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [RESEND PATCH 0/4] block: clean up Kconfig and Makefile
  2021-09-27 13:59 [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Masahiro Yamada
                   ` (3 preceding siblings ...)
  2021-09-27 14:00 ` [RESEND PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile Masahiro Yamada
@ 2021-09-28  5:24 ` Christoph Hellwig
  2021-10-16  8:51 ` Masahiro Yamada
  2021-10-16 22:10 ` Jens Axboe
  6 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2021-09-28  5:24 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Jens Axboe, linux-block, linux-kernel

The whole series looks good to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RESEND PATCH 0/4] block: clean up Kconfig and Makefile
  2021-09-27 13:59 [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Masahiro Yamada
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-10-16  8:51 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Linux Kernel Mailing List

Hi Jens,

On Mon, Sep 27, 2021 at 11:00 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
>
> This is a resend of
> https://lore.kernel.org/linux-block/20210528184435.252924-1-masahiroy@kernel.org/#t


ping?

>
>
> Masahiro Yamada (4):
>   block: remove redundant =y from BLK_CGROUP dependency
>   block: simplify Kconfig files
>   block: move menu "Partition type" to block/partitions/Kconfig
>   block: move CONFIG_BLOCK guard to top Makefile
>
>  Makefile                 |  3 ++-
>  block/Kconfig            | 28 ++++++++++------------------
>  block/Kconfig.iosched    |  4 ----
>  block/Makefile           |  2 +-
>  block/partitions/Kconfig |  4 ++++
>  5 files changed, 17 insertions(+), 24 deletions(-)
>
> --
> 2.30.2
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RESEND PATCH 0/4] block: clean up Kconfig and Makefile
  2021-09-27 13:59 [RESEND PATCH 0/4] block: clean up Kconfig and Makefile Masahiro Yamada
                   ` (5 preceding siblings ...)
  2021-10-16  8:51 ` Masahiro Yamada
@ 2021-10-16 22:10 ` Jens Axboe
  6 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2021-10-16 22:10 UTC (permalink / raw)
  To: linux-block, Masahiro Yamada; +Cc: Jens Axboe, linux-kernel

On Mon, 27 Sep 2021 22:59:56 +0900, Masahiro Yamada wrote:
> This is a resend of
> https://lore.kernel.org/linux-block/20210528184435.252924-1-masahiroy@kernel.org/#t
> 
> 
> 
> Masahiro Yamada (4):
>   block: remove redundant =y from BLK_CGROUP dependency
>   block: simplify Kconfig files
>   block: move menu "Partition type" to block/partitions/Kconfig
>   block: move CONFIG_BLOCK guard to top Makefile
> 
> [...]

Applied, thanks!

[1/4] block: remove redundant =y from BLK_CGROUP dependency
      commit: 21baefbb1558318bd32b3a5130dd93d76d64df72
[2/4] block: simplify Kconfig files
      commit: 59b0555ae1c3ddc506c64ad44efa1841ad5843d7
[3/4] block: move menu "Partition type" to block/partitions/Kconfig
      commit: 9b95c675b440156da5b99194e47755728362f4b6
[4/4] block: move CONFIG_BLOCK guard to top Makefile
      commit: 782b51ee1f9915942809dea14e7881489cf3ff10

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-16 22:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [RESEND PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile Masahiro Yamada
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.