Skip to contentSkip to conversation

target: Kconfig fixes

PATCH In review Christoph Hellwig 3 participants 3 messages Nov 15, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 target: Kconfig fixes

Use the menuconfig verb for the main TARGET_CORE option to make it look better in menuconfig, use a big if TARGET_CORE to get rid of a lot of depends, use help instead of ---help---, shorten lines to be under 80 chars where applicable, convert options to bool instead of tristate where they should be, and remove the discuraged default values for all the options.

drivers/target/Kconfig +21 -19
Index: lio-core/drivers/target/Kconfig
===================================================================
@@ -1,39 +1,41 @@
-config TARGET_CORE
+
+menuconfig TARGET_CORE
     tristate "Generic Target Core Mod (TCM) and ConfigFS Infrastructure"
     select CONFIGFS_FS
-    default m
-    ---help---
-    Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled control path for target_core_mod.  This includes built-in TCM RAMDISK subsystem logic for virtual LUN 0 access
+    help
+      Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled
+      control path for target_core_mod.  This includes built-in TCM RAMDISK
+      subsystem logic for virtual LUN 0 access
+
+if TARGET_CORE
 
 config TCM_IBLOCK
 	tristate "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK"
-	depends on TARGET_CORE
-	default y
-	---help---
-	Say Y here to enable the TCM/IBLOCK subsystem plugin for non-buffered access to Linux/Block devices using BIO
+	help
+	Say Y here to enable the TCM/IBLOCK subsystem plugin for non-buffered
+	access to Linux/Block devices using BIO
 
 config TCM_FILEIO
 	tristate "TCM/FILEIO Subsystem Plugin for Linux/VFS"
-	depends on TARGET_CORE
-	default y
-	---help---
-	Say Y here to enable the TCM/FILEIO subsystem plugin for buffered access to Linux/VFS struct file or struct block_device
+	help
+	Say Y here to enable the TCM/FILEIO subsystem plugin for buffered
+	access to Linux/VFS struct file or struct block_device
 
 config TCM_PSCSI
 	tristate "TCM/pSCSI Subsystem Plugin for Linux/SCSI"
-	depends on TARGET_CORE
-	default y
-	---help---
-	Say Y here to enable the TCM/pSCSI subsystem plugin for non-buffered passthrough access to Linux/SCSI device
+	help
+	Say Y here to enable the TCM/pSCSI subsystem plugin for non-buffered
+	passthrough access to Linux/SCSI device
 
 config TCM_STGT
 	tristate "TCM/STGT Subsystem Plugin"
-	depends on TARGET_CORE && EXPERIMENTAL
+	depends on EXPERIMENTAL
 	select SCSI_TGT
-	default n
-	---help---
+	help
 	Say Y here to enable the WIP TCM/STGT subsystem plugin for accessing STGT device
 
 source "drivers/target/tcm_loop/Kconfig"
 source "drivers/target/lio-target/Kconfig"
 source "drivers/target/tcm_fc/Kconfig"
+
+endif
drivers/target/tcm_fc/Kconfig +2 -3
Index: lio-core/drivers/target/tcm_fc/Kconfig
===================================================================
@@ -1,6 +1,5 @@
 config TCM_FC
 	tristate "TCM_FC fabric Plugin"
-	depends on TARGET_CORE && LIBFC
-	default n
-	---help---
+	depends on LIBFC
+	help
 	Say Y here to enable the TCM FC plugin for accessing FC fabrics in TCM
drivers/target/tcm_loop/Kconfig +7 -9
Index: lio-core/drivers/target/tcm_loop/Kconfig
===================================================================
@@ -1,13 +1,11 @@
 config TCM_LOOP_FABRIC
-        tristate "TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module "
-        depends on TARGET_CORE && CONFIGFS_FS
-        default n
-        ---help---
-        Say Y here to enable the TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module
+        tristate "TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module"
+        help
+        Say Y here to enable the TCM Virtual SAS target and Linux/SCSI LDD
+	fabric loopback module.
 
 config TCM_LOOP_CDB_DEBUG
-	tristate "TCM loopback fabric module CDB debug code"
-	depends on TARGET_CORE && CONFIGFS_FS && TCM_LOOP_FABRIC
-	default n
-	---help---
+	bool "TCM loopback fabric module CDB debug code"
+	depends on TCM_LOOP_FABRIC
+	help
 	Say Y here to enable the TCM loopback fabric module CDB debug code
drivers/target/lio-target/Kconfig +8 -21
Index: lio-core/drivers/target/lio-target/Kconfig
===================================================================
@@ -1,29 +1,16 @@
 config LIO_TARGET
         tristate "Linux-iSCSI.org iSCSI Target Mode Stack"
-        default m
-        depends on TARGET_CORE
-	select CONFIGFS_FS
-        ---help---
-        Say Y here to enable the ConfigFS enabled Linux-iSCSI.org iSCSI Target Mode Stack
-
-config LIO_TARGET_SNMP
-	tristate "LIO-Target iSCSI MIBs"
-	default y
-	depends on LIO_TARGET && PROC_FS
-	---help---
-	Say Y here to enable the iSCSI MIBs via procfs for LIO-Target.
+        help
+        Say Y here to enable the ConfigFS enabled Linux-iSCSI.org iSCSI
+	Target Mode Stack.
 
 config LIO_TARGET_DEBUG
-	tristate "LIO-Target iscsi_debug.h ring buffer messages" 
-	default n
-	depends on LIO_TARGET
-	---help---
+	bool "LIO-Target iscsi_debug.h ring buffer messages"
+	help
 	Say Y here to enable the legacy DEBUG_ISCSI macros in iscsi_debug.h
 
 config LIO_TARGET_DEBUG_ERL
-	tristate "LIO-Target ErrorRecoveryLevel debug code"
-	default n
-	depends on LIO_TARGET
-	---help---
-	Say Y here to enable the iSCSI ErrorRecoveryLevel debugging code
+	bool "LIO-Target ErrorRecoveryLevel debug code"
+	help
+	Say Y here to enable the iSCSI ErrorRecoveryLevel debugging code.
 	
Acked-by on v1 1/2
#1 lore raw
Quoted 8 lines · On Mon, 15 Nov 2010 14:43:15 -0500 Christoph Hellwig wrote:

Use the menuconfig verb for the main TARGET_CORE option to make it look better in menuconfig, use a big if TARGET_CORE to get rid of a lot of depends, use help instead of ---help---, shorten lines to be under 80 chars where applicable, convert options to bool instead of tristate where they should be, and remove the discuraged default values for all the options.

Yes, mostly looks good, with the small exception of a few spaces-for-indents that should be tabs. (identified below)

Thanks.

drivers/target/Kconfig line 3

Quoted 9 lines

Index: lio-core/drivers/target/Kconfig
===================================================================

drivers/target/Kconfig +2 -1
@@ -1,39 +1,41 @@
-config TARGET_CORE
+
+menuconfig TARGET_CORE
     tristate "Generic Target Core Mod (TCM) and ConfigFS Infrastructure"

Unchanged line above uses spaces instead of tab for indent.

Quoted 74 lines
drivers/target/Kconfig +19 -18
     select CONFIGFS_FS
-    default m
-    ---help---
-    Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled control path for target_core_mod.  This includes built-in TCM RAMDISK subsystem logic for virtual LUN 0 access
+    help
+      Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled
+      control path for target_core_mod.  This includes built-in TCM RAMDISK
+      subsystem logic for virtual LUN 0 access
+
+if TARGET_CORE
 
 config TCM_IBLOCK
 	tristate "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK"
-	depends on TARGET_CORE
-	default y
-	---help---
-	Say Y here to enable the TCM/IBLOCK subsystem plugin for non-buffered access to Linux/Block devices using BIO
+	help
+	Say Y here to enable the TCM/IBLOCK subsystem plugin for non-buffered
+	access to Linux/Block devices using BIO
 
 config TCM_FILEIO
 	tristate "TCM/FILEIO Subsystem Plugin for Linux/VFS"
-	depends on TARGET_CORE
-	default y
-	---help---
-	Say Y here to enable the TCM/FILEIO subsystem plugin for buffered access to Linux/VFS struct file or struct block_device
+	help
+	Say Y here to enable the TCM/FILEIO subsystem plugin for buffered
+	access to Linux/VFS struct file or struct block_device
 
 config TCM_PSCSI
 	tristate "TCM/pSCSI Subsystem Plugin for Linux/SCSI"
-	depends on TARGET_CORE
-	default y
-	---help---
-	Say Y here to enable the TCM/pSCSI subsystem plugin for non-buffered passthrough access to Linux/SCSI device
+	help
+	Say Y here to enable the TCM/pSCSI subsystem plugin for non-buffered
+	passthrough access to Linux/SCSI device
 
 config TCM_STGT
 	tristate "TCM/STGT Subsystem Plugin"
-	depends on TARGET_CORE && EXPERIMENTAL
+	depends on EXPERIMENTAL
 	select SCSI_TGT
-	default n
-	---help---
+	help
 	Say Y here to enable the WIP TCM/STGT subsystem plugin for accessing STGT device
 
 source "drivers/target/tcm_loop/Kconfig"
 source "drivers/target/lio-target/Kconfig"
 source "drivers/target/tcm_fc/Kconfig"
+
+endif

Index: lio-core/drivers/target/tcm_fc/Kconfig
===================================================================

drivers/target/tcm_fc/Kconfig +2 -3
@@ -1,6 +1,5 @@
 config TCM_FC
 	tristate "TCM_FC fabric Plugin"
-	depends on TARGET_CORE && LIBFC
-	default n
-	---help---
+	depends on LIBFC
+	help
 	Say Y here to enable the TCM FC plugin for accessing FC fabrics in TCM

Index: lio-core/drivers/target/tcm_loop/Kconfig
===================================================================

drivers/target/tcm_loop/Kconfig line 4

Quoted 9 lines
drivers/target/tcm_loop/Kconfig +3 -5
@@ -1,13 +1,11 @@
 config TCM_LOOP_FABRIC
-        tristate "TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module "
-        depends on TARGET_CORE && CONFIGFS_FS
-        default n
-        ---help---
-        Say Y here to enable the TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module
+        tristate "TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module"
+        help
+        Say Y here to enable the TCM Virtual SAS target and Linux/SCSI LDD

The 3 lines above use spaces for indents instead of tabs.

Quoted 22 lines
drivers/target/tcm_loop/Kconfig +4 -4
+	fabric loopback module.
 
 config TCM_LOOP_CDB_DEBUG
-	tristate "TCM loopback fabric module CDB debug code"
-	depends on TARGET_CORE && CONFIGFS_FS && TCM_LOOP_FABRIC
-	default n
-	---help---
+	bool "TCM loopback fabric module CDB debug code"
+	depends on TCM_LOOP_FABRIC
+	help
 	Say Y here to enable the TCM loopback fabric module CDB debug code

Index: lio-core/drivers/target/lio-target/Kconfig
===================================================================

drivers/target/lio-target/Kconfig +0 -4
@@ -1,29 +1,16 @@
 config LIO_TARGET
         tristate "Linux-iSCSI.org iSCSI Target Mode Stack"
-        default m
-        depends on TARGET_CORE
-	select CONFIGFS_FS
-        ---help---

drivers/target/lio-target/Kconfig line 4

Quoted 10 lines
drivers/target/lio-target/Kconfig +2 -8
-        Say Y here to enable the ConfigFS enabled Linux-iSCSI.org iSCSI Target Mode Stack
-
-config LIO_TARGET_SNMP
-	tristate "LIO-Target iSCSI MIBs"
-	default y
-	depends on LIO_TARGET && PROC_FS
-	---help---
-	Say Y here to enable the iSCSI MIBs via procfs for LIO-Target.
+        help
+        Say Y here to enable the ConfigFS enabled Linux-iSCSI.org iSCSI

2 lines above use spaces instead of tabs for indent.

Quoted 12 lines
drivers/target/lio-target/Kconfig +3 -4
+	Target Mode Stack.
 
 config LIO_TARGET_DEBUG
-	tristate "LIO-Target iscsi_debug.h ring buffer messages" 
-	default n
-	depends on LIO_TARGET
-	---help---
+	bool "LIO-Target iscsi_debug.h ring buffer messages"
+	help
 	Say Y here to enable the legacy DEBUG_ISCSI macros in iscsi_debug.h
 
 config LIO_TARGET_DEBUG_ERL

drivers/target/lio-target/Kconfig

Quoted 10 lines
drivers/target/lio-target/Kconfig +3 -6
-	tristate "LIO-Target ErrorRecoveryLevel debug code"
-	default n
-	depends on LIO_TARGET
-	---help---
-	Say Y here to enable the iSCSI ErrorRecoveryLevel debugging code
+	bool "LIO-Target ErrorRecoveryLevel debug code"
+	help
+	Say Y here to enable the iSCSI ErrorRecoveryLevel debugging code.
 
--

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#2 lore raw
Quoted 9 lines · Randy Dunlap
Quoted 7 lines · On Mon, 15 Nov 2010 14:43:15 -0500 Christoph Hellwig wrote:

Use the menuconfig verb for the main TARGET_CORE option to make it look better in menuconfig, use a big if TARGET_CORE to get rid of a lot of depends, use help instead of ---help---, shorten lines to be under 80 chars where applicable, convert options to bool instead of tristate where they should be, and remove the discuraged default values for all the options.

Quoted 7 lines
Quoted 1 line

Yes, mostly looks good, with the small exception of a few spaces-for-indents that should be tabs. (identified below)

Thanks guys, commited w/ Randy's spaces-for-indents fixes as d04f491.

--nab