* [PATCH] mtd: rawnand: atmel: Add dependency on GENERIC_ALLOCATOR
@ 2018-08-11 10:40 Boris Brezillon
2018-08-11 12:13 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Boris Brezillon @ 2018-08-11 10:40 UTC (permalink / raw)
To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
Cc: David Woodhouse, Brian Norris, Marek Vasut, Randy Dunlap
The driver uses genalloc functions. Add a dependency on
GENERIC_ALLOCATOR to prevent build errors when selected through
COMPILE_TEST.
Fixes: 88a40e7dca00 ("mtd: rawnand: atmel: Allow selection of this driver when COMPILE_TEST=y")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
drivers/mtd/nand/raw/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index b6738ece16f1..0c3cc3e8e144 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -278,7 +278,7 @@ config MTD_NAND_CS553X
config MTD_NAND_ATMEL
tristate "Support for NAND Flash / SmartMedia on AT91"
depends on ARCH_AT91 || COMPILE_TEST
- depends on HAS_IOMEM
+ depends on HAS_IOMEM && GENERIC_ALLOCATOR
select MFD_ATMEL_SMC
help
Enables support for NAND Flash / Smart Media Card interface
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: rawnand: atmel: Add dependency on GENERIC_ALLOCATOR
2018-08-11 10:40 [PATCH] mtd: rawnand: atmel: Add dependency on GENERIC_ALLOCATOR Boris Brezillon
@ 2018-08-11 12:13 ` Thomas Petazzoni
2018-08-11 13:49 ` Boris Brezillon
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-11 12:13 UTC (permalink / raw)
To: Boris Brezillon
Cc: Richard Weinberger, Miquel Raynal, linux-mtd, Marek Vasut,
Brian Norris, David Woodhouse, Randy Dunlap
Hello,
On Sat, 11 Aug 2018 12:40:22 +0200, Boris Brezillon wrote:
> The driver uses genalloc functions. Add a dependency on
> GENERIC_ALLOCATOR to prevent build errors when selected through
> COMPILE_TEST.
>
> Fixes: 88a40e7dca00 ("mtd: rawnand: atmel: Allow selection of this driver when COMPILE_TEST=y")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> ---
> drivers/mtd/nand/raw/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index b6738ece16f1..0c3cc3e8e144 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -278,7 +278,7 @@ config MTD_NAND_CS553X
> config MTD_NAND_ATMEL
> tristate "Support for NAND Flash / SmartMedia on AT91"
> depends on ARCH_AT91 || COMPILE_TEST
> - depends on HAS_IOMEM
> + depends on HAS_IOMEM && GENERIC_ALLOCATOR
I think this kind of dependency should use a "select".
$ git grep "select.*GENERIC_ALLOCATOR" | wc -l
28
$ git grep "depends.*GENERIC_ALLOCATOR" | wc -l
1
It makes sense as it is a kind of "library" of functions, there's no
reason for the user to be aware of this dependency. HAS_IOMEM is
different, because it's a property of the architecture/platform.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: rawnand: atmel: Add dependency on GENERIC_ALLOCATOR
2018-08-11 12:13 ` Thomas Petazzoni
@ 2018-08-11 13:49 ` Boris Brezillon
0 siblings, 0 replies; 3+ messages in thread
From: Boris Brezillon @ 2018-08-11 13:49 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Richard Weinberger, Miquel Raynal, linux-mtd, Marek Vasut,
Brian Norris, David Woodhouse, Randy Dunlap
On Sat, 11 Aug 2018 14:13:29 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> Hello,
>
> On Sat, 11 Aug 2018 12:40:22 +0200, Boris Brezillon wrote:
> > The driver uses genalloc functions. Add a dependency on
> > GENERIC_ALLOCATOR to prevent build errors when selected through
> > COMPILE_TEST.
> >
> > Fixes: 88a40e7dca00 ("mtd: rawnand: atmel: Allow selection of this driver when COMPILE_TEST=y")
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> > ---
> > drivers/mtd/nand/raw/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> > index b6738ece16f1..0c3cc3e8e144 100644
> > --- a/drivers/mtd/nand/raw/Kconfig
> > +++ b/drivers/mtd/nand/raw/Kconfig
> > @@ -278,7 +278,7 @@ config MTD_NAND_CS553X
> > config MTD_NAND_ATMEL
> > tristate "Support for NAND Flash / SmartMedia on AT91"
> > depends on ARCH_AT91 || COMPILE_TEST
> > - depends on HAS_IOMEM
> > + depends on HAS_IOMEM && GENERIC_ALLOCATOR
>
> I think this kind of dependency should use a "select".
>
> $ git grep "select.*GENERIC_ALLOCATOR" | wc -l
> 28
> $ git grep "depends.*GENERIC_ALLOCATOR" | wc -l
> 1
>
> It makes sense as it is a kind of "library" of functions, there's no
> reason for the user to be aware of this dependency. HAS_IOMEM is
> different, because it's a property of the architecture/platform.
Indeed. I always have a hard time choosing between 'select' and 'depends
on'. Looks like I got it wrong this time too.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-11 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-11 10:40 [PATCH] mtd: rawnand: atmel: Add dependency on GENERIC_ALLOCATOR Boris Brezillon
2018-08-11 12:13 ` Thomas Petazzoni
2018-08-11 13:49 ` Boris Brezillon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.