diff mbox

[U-Boot,v5,6/16] mtd: ubi: Select RBTREE option from MTD_UBI Kconfig entry

Message ID 63c7aa869bcf2c9f6ef28b76a2c097eee4a570ec.1488215509.git-series.maxime.ripard@free-electrons.com
State Accepted
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Maxime Ripard Feb. 27, 2017, 5:22 p.m. UTC
From: Boris Brezillon <boris.brezillon@free-electrons.com>

Expose the RBTREE feature through Kconfig and select this option from the
MTD_UBI option.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/mtd/ubi/Kconfig | 1 +
 lib/Kconfig             | 3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

Comments

Boris Brezillon Feb. 27, 2017, 5:49 p.m. UTC | #1
On Mon, 27 Feb 2017 18:22:05 +0100
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> From: Boris Brezillon <boris.brezillon@free-electrons.com>
> 
> Expose the RBTREE feature through Kconfig and select this option from the
> MTD_UBI option.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/mtd/ubi/Kconfig | 1 +
>  lib/Kconfig             | 3 +++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
> index 0c82395317ab..cb9ba78681ed 100644
> --- a/drivers/mtd/ubi/Kconfig
> +++ b/drivers/mtd/ubi/Kconfig
> @@ -3,6 +3,7 @@ menu "UBI support"
>  config MTD_UBI
>  	bool "Enable UBI - Unsorted block images"
>  	select CRC32
> +	select RBTREE if ARCH_SUNXI

I just grep-ed in the source for CONFIG_CMD_UBI and CONFIG_MTD_UBI, and
it seems that all boards have been converted to select the Kconfig
option instead of having it defined in their <board>.h config header.

This means you could to drop the 'if ARCH_SUNXI' and add the changes
you get after executing the following command to this commit:

# git grep -l "#define CONFIG_RBTREE" | \
  xargs sed -i "/#define CONFIG_RBTREE/d"

Of course, i's just a suggestion, ans we can do that after this series
has been merged.

>  	help
>  	  UBI is a software layer above MTD layer which admits of LVM-like
>  	  logical volumes on top of MTD devices, hides some complexities of
> diff --git a/lib/Kconfig b/lib/Kconfig
> index b16062fbe333..5944d967dff4 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -52,6 +52,9 @@ config LIB_RAND
>  	help
>  	  This library provides pseudo-random number generator functions.
>  
> +config RBTREE
> +	bool
> +
>  source lib/dhry/Kconfig
>  
>  source lib/rsa/Kconfig
diff mbox

Patch

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 0c82395317ab..cb9ba78681ed 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -3,6 +3,7 @@  menu "UBI support"
 config MTD_UBI
 	bool "Enable UBI - Unsorted block images"
 	select CRC32
+	select RBTREE if ARCH_SUNXI
 	help
 	  UBI is a software layer above MTD layer which admits of LVM-like
 	  logical volumes on top of MTD devices, hides some complexities of
diff --git a/lib/Kconfig b/lib/Kconfig
index b16062fbe333..5944d967dff4 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -52,6 +52,9 @@  config LIB_RAND
 	help
 	  This library provides pseudo-random number generator functions.
 
+config RBTREE
+	bool
+
 source lib/dhry/Kconfig
 
 source lib/rsa/Kconfig