From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Brezillon Date: Wed, 5 Dec 2018 11:16:15 +0100 Subject: [U-Boot] [PATCH v3 24/28] cmd: mtdparts: show Kconfig options only if the command is selected In-Reply-To: <20181204235714.11805-25-miquel.raynal@bootlin.com> References: <20181204235714.11805-1-miquel.raynal@bootlin.com> <20181204235714.11805-25-miquel.raynal@bootlin.com> Message-ID: <20181205111615.35ae6941@bbrezillon> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 5 Dec 2018 00:57:10 +0100 Miquel Raynal wrote: > Guard mtdparts options with an if/endif statement in Kconfig. Also > move the Kconfig entry of the option right after the entry of the > command. > > Signed-off-by: Miquel Raynal > --- > cmd/Kconfig | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > > diff --git a/cmd/Kconfig b/cmd/Kconfig > index bf9cc0c52d..cf58174013 100644 > --- a/cmd/Kconfig > +++ b/cmd/Kconfig > @@ -1741,6 +1741,17 @@ config CMD_MTDPARTS > declare the partitions in the mtdparts environment variable > but better use the MTD stack and the 'mtd' command instead. > > +if CMD_MTDPARTS > +config CMD_MTDPARTS_SPREAD > + bool "Padd partition size to take account of bad blocks" We usually use "depends on" in such cases depends on CMD_MTDPARTS > + help > + This enables the 'spread' sub-command of the mtdparts command. > + This command will modify the existing mtdparts variable by increasing > + the size of the partitions such that 1) each partition's net size is > + at least as large as the size specified in the mtdparts variable and > + 2) each partition starts on a good block. > +endif > + > config MTDIDS_DEFAULT > string "Default MTD IDs" > depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH > @@ -1755,16 +1766,6 @@ config MTDPARTS_DEFAULT > Defines a default MTD partitioning scheme in the Linux MTD command > line partitions format > > -config CMD_MTDPARTS_SPREAD > - bool "Padd partition size to take account of bad blocks" > - depends on CMD_MTDPARTS > - help > - This enables the 'spread' sub-command of the mtdparts command. > - This command will modify the existing mtdparts variable by increasing > - the size of the partitions such that 1) each partition's net size is > - at least as large as the size specified in the mtdparts variable and > - 2) each partition starts on a good block. > - > config CMD_REISER > bool "reiser - Access to reiserfs filesystems" > help