diff mbox

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

Message ID c2b8d166aa1d663a93cf2da557f6e4753f3e59f0.1485179128.git-series.maxime.ripard@free-electrons.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Maxime Ripard Jan. 23, 2017, 1:46 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

Jagan Teki Jan. 26, 2017, 11:58 a.m. UTC | #1
On Mon, Jan 23, 2017 at 2:46 PM, 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

Better to define Kconfig for RBTREE at lib/ and make default there if
required, this would easy for understanding directory specific Kconfig
defines as well as showing some help text about RBTREE.

thanks!
Maxime Ripard Jan. 27, 2017, 8:15 p.m. UTC | #2
On Thu, Jan 26, 2017 at 12:58:56PM +0100, Jagan Teki wrote:
> On Mon, Jan 23, 2017 at 2:46 PM, 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
> 
> Better to define Kconfig for RBTREE at lib/ and make default there if
> required, this would easy for understanding directory specific Kconfig
> defines as well as showing some help text about RBTREE.

I'm not sure why we'd need to make it a default. This is not optional,
and disabling it will result in a breakage in the UBI code.

Maxime
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