All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [RFC/PATCH] mtd: Hide CONFIG_MTD_BLKDEVS from the menu
Date: Sun, 5 Jan 2014 00:46:10 -0800	[thread overview]
Message-ID: <20140105084547.GA2929@brian-ubuntu> (raw)
In-Reply-To: <1386943124-8005-1-git-send-email-ezequiel.garcia@free-electrons.com>

Hi Ezequiel,

On Fri, Dec 13, 2013 at 10:58:44AM -0300, Ezequiel Garcia wrote:
> Make this option a hidden one and get a cleaner configuration.
> This option just selects a common infrastructure for MTD-based devices
> to expose a block interface. There is no point in allowing a separate
> enable/disable.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> ---
>  drivers/mtd/Kconfig | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
> index 5fab4e6e..2a0ca2a 100644
> --- a/drivers/mtd/Kconfig
> +++ b/drivers/mtd/Kconfig
> @@ -158,9 +158,7 @@ config MTD_BCM47XX_PARTS
>  comment "User Modules And Translation Layers"
>  
>  config MTD_BLKDEVS
> -	tristate "Common interface to block layer for MTD 'translation layers'"
> -	depends on BLOCK
> -	default n
> +	bool
>  
>  config MTD_BLOCK
>  	tristate "Caching block device access to MTD devices"

Hmm, I'm seeing some issues with this patch. I think it's problematic
that you are changing MTD_BLKDEVS from tristate to bool. We can't have
MTD_BLKDEVS built into the kernel while MTD itself is built as a module.
This manifests in linker errors in my all-module builds, with .config
like this (note that MTD_BLKDEVS gets "select"ed by MTD_SWAP, which
forces it to be built-in, not built as a module):

CONFIG_MTD=m
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_SWAP=m

[...]
  Building modules, stage 2.
    MODPOST 14 modules
    ERROR: "deregister_mtd_blktrans" [drivers/mtd/mtdswap.ko] undefined!
    ERROR: "register_mtd_blktrans" [drivers/mtd/mtdswap.ko] undefined!
    ERROR: "add_mtd_blktrans_dev" [drivers/mtd/mtdswap.ko] undefined!
    ERROR: "mtd_blktrans_cease_background" [drivers/mtd/mtdswap.ko] undefined!
    ERROR: "del_mtd_blktrans_dev" [drivers/mtd/mtdswap.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

I believe the correct solution would be the following additional diff:

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index cdaa4e512c97..5ebcda39f554 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -161,7 +161,7 @@ comment "User Modules And Translation Layers"
 # MTD block device support is select'ed if needed
 #
 config MTD_BLKDEVS
-	bool
+	tristate
 
 config MTD_BLOCK
 	tristate "Caching block device access to MTD devices"
--

I'll squash this into your patch if I don't hear any objections.

Brian

  parent reply	other threads:[~2014-01-05  8:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 13:58 [RFC/PATCH] mtd: Hide CONFIG_MTD_BLKDEVS from the menu Ezequiel Garcia
2013-12-20  0:47 ` Ezequiel Garcia
2013-12-20  2:05   ` Brian Norris
2013-12-20 18:17     ` Ezequiel Garcia
2014-01-03 19:48       ` Brian Norris
2014-01-05  8:46 ` Brian Norris [this message]
2014-01-05 17:37   ` Ezequiel Garcia
2014-01-05 22:06     ` Brian Norris

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=20140105084547.GA2929@brian-ubuntu \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 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.