On Wed,  5 Dec 2018 00:57:10 +0100
Miquel Raynal <[email protected]> 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 <[email protected]>
> ---
>  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

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to