Skip to contentSkip to conversation

BLOCK: Simplify the Kconfig structure for the BLOCK layer.

PATCH New Robert P. J. Day 1 participant 1 message Aug 4, 2008 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 BLOCK: Simplify the Kconfig structure for the BLOCK layer.

Given that everything in block/Kconfig and block/Kconfig.iosched depends on "BLOCK", might as well just wrap the entire contents in a single conditional and remove the unnecessary tests.

---

unless there's something tricky or obscure that can happen in the
block layer that *doesn't* depend on BLOCK, this should be a reasonable simplification.

 block/Kconfig         |    6 +++---
 block/Kconfig.iosched |    4 ----
 2 files changed, 3 insertions(+), 7 deletions(-)
block/Kconfig +3 -3
index 1ab7c15..66cfacd 100644
@@ -93,11 +93,11 @@ config BLK_DEV_INTEGRITY
 	T10/SCSI Data Integrity Field or the T13/ATA External Path
 	Protection.  If in doubt, say N.
 
-endif # BLOCK
-
 config BLOCK_COMPAT
 	bool
-	depends on BLOCK && COMPAT
+	depends on COMPAT
 	default y
 
 source block/Kconfig.iosched
+
+endif # BLOCK
block/Kconfig.iosched +0 -4
index 7e803fc..5ada7f1 100644
@@ -1,5 +1,3 @@
-if BLOCK
-
 menu "IO Schedulers"
 
 config IOSCHED_NOOP
@@ -69,5 +67,3 @@ config DEFAULT_IOSCHED
 	default "noop" if DEFAULT_NOOP
 
 endmenu
-
-endif

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================