Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-mtd@lists.infradead.org,
	Marek Vasut <marek.vasut@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH] mtd: rawnand: atmel: Add dependency on GENERIC_ALLOCATOR
Date: Sat, 11 Aug 2018 15:49:30 +0200	[thread overview]
Message-ID: <20180811154930.4d3020a5@bbrezillon> (raw)
In-Reply-To: <20180811141329.237ba017@windsurf>

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.

      reply	other threads:[~2018-08-11 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180811154930.4d3020a5@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox