Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

UBI: cleanup and simplify Kconfig

Cleanup the Kconfig for UBI by using menuconfig to enable/disable the entire
driver. Remove the dependency checks for MTD_UBI and MTD_UBI_DEBUG by
wrapping the options in if/endif blocks and remove any redundant checks.
Remove all default n since that is the Kconfig default. Change menu "Additional
UBI debugging messages" into a comment to remove one menu level.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

authored by

H Hartley Sweeten and committed by
Artem Bityutskiy
1dd78632 cd07202c

+10 -36
+6 -11
drivers/mtd/ubi/Kconfig
··· 1 - menu "UBI - Unsorted block images" 2 - depends on MTD 3 - 4 - config MTD_UBI 5 - tristate "Enable UBI" 6 - depends on MTD 1 + menuconfig MTD_UBI 2 + tristate "Enable UBI - Unsorted block images" 7 3 select CRC32 8 4 help 9 5 UBI is a software layer above MTD layer which admits of LVM-like ··· 8 12 capabilities. Please, consult the MTD web site for more details 9 13 (www.linux-mtd.infradead.org). 10 14 15 + if MTD_UBI 16 + 11 17 config MTD_UBI_WL_THRESHOLD 12 18 int "UBI wear-leveling threshold" 13 19 default 4096 14 20 range 2 65536 15 - depends on MTD_UBI 16 21 help 17 22 This parameter defines the maximum difference between the highest 18 23 erase counter value and the lowest erase counter value of eraseblocks ··· 31 34 int "Percentage of reserved eraseblocks for bad eraseblocks handling" 32 35 default 1 33 36 range 0 25 34 - depends on MTD_UBI 35 37 help 36 38 If the MTD device admits of bad eraseblocks (e.g. NAND flash), UBI 37 39 reserves some amount of physical eraseblocks to handle new bad ··· 44 48 45 49 config MTD_UBI_GLUEBI 46 50 tristate "MTD devices emulation driver (gluebi)" 47 - default n 48 - depends on MTD_UBI 49 51 help 50 52 This option enables gluebi - an additional driver which emulates MTD 51 53 devices on top of UBI volumes: for each UBI volumes an MTD device is ··· 53 59 software. 54 60 55 61 source "drivers/mtd/ubi/Kconfig.debug" 56 - endmenu 62 + 63 + endif # MTD_UBI
+4 -25
drivers/mtd/ubi/Kconfig.debug
··· 1 1 comment "UBI debugging options" 2 - depends on MTD_UBI 3 2 4 3 config MTD_UBI_DEBUG 5 4 bool "UBI debugging" 6 5 depends on SYSFS 7 - depends on MTD_UBI 8 6 select DEBUG_FS 9 7 select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL 10 8 help 11 9 This option enables UBI debugging. 12 10 11 + if MTD_UBI_DEBUG 12 + 13 13 config MTD_UBI_DEBUG_MSG 14 14 bool "UBI debugging messages" 15 - depends on MTD_UBI_DEBUG 16 - default n 17 15 help 18 16 This option enables UBI debugging messages. 19 17 20 18 config MTD_UBI_DEBUG_PARANOID 21 19 bool "Extra self-checks" 22 - default n 23 - depends on MTD_UBI_DEBUG 24 20 help 25 21 This option enables extra checks in UBI code. Note this slows UBI down 26 22 significantly. 27 23 28 24 config MTD_UBI_DEBUG_DISABLE_BGT 29 25 bool "Do not enable the UBI background thread" 30 - depends on MTD_UBI_DEBUG 31 - default n 32 26 help 33 27 This option switches the background thread off by default. The thread 34 28 may be also be enabled/disabled via UBI sysfs. 35 29 36 30 config MTD_UBI_DEBUG_EMULATE_BITFLIPS 37 31 bool "Emulate flash bit-flips" 38 - depends on MTD_UBI_DEBUG 39 - default n 40 32 help 41 33 This option emulates bit-flips with probability 1/50, which in turn 42 34 causes scrubbing. Useful for debugging and stressing UBI. 43 35 44 36 config MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES 45 37 bool "Emulate flash write failures" 46 - depends on MTD_UBI_DEBUG 47 - default n 48 38 help 49 39 This option emulates write failures with probability 1/100. Useful for 50 40 debugging and testing how UBI handlines errors. 51 41 52 42 config MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES 53 43 bool "Emulate flash erase failures" 54 - depends on MTD_UBI_DEBUG 55 - default n 56 44 help 57 45 This option emulates erase failures with probability 1/100. Useful for 58 46 debugging and testing how UBI handlines errors. 59 47 60 - menu "Additional UBI debugging messages" 61 - depends on MTD_UBI_DEBUG 48 + comment "Additional UBI debugging messages" 62 49 63 50 config MTD_UBI_DEBUG_MSG_BLD 64 51 bool "Additional UBI initialization and build messages" 65 - default n 66 - depends on MTD_UBI_DEBUG 67 52 help 68 53 This option enables detailed UBI initialization and device build 69 54 debugging messages. 70 55 71 56 config MTD_UBI_DEBUG_MSG_EBA 72 57 bool "Eraseblock association unit messages" 73 - default n 74 - depends on MTD_UBI_DEBUG 75 58 help 76 59 This option enables debugging messages from the UBI eraseblock 77 60 association unit. 78 61 79 62 config MTD_UBI_DEBUG_MSG_WL 80 63 bool "Wear-leveling unit messages" 81 - default n 82 - depends on MTD_UBI_DEBUG 83 64 help 84 65 This option enables debugging messages from the UBI wear-leveling 85 66 unit. 86 67 87 68 config MTD_UBI_DEBUG_MSG_IO 88 69 bool "Input/output unit messages" 89 - default n 90 - depends on MTD_UBI_DEBUG 91 70 help 92 71 This option enables debugging messages from the UBI input/output unit. 93 72 94 - endmenu # UBI debugging messages 73 + endif # MTD_UBI_DEBUG