public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Huang Shijie <b32955@freescale.com>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH 08/10] mtd: add MTD_MLCNANDFLASH case for mtd_type_show()
Date: Mon, 12 Aug 2013 18:05:02 -0700	[thread overview]
Message-ID: <20130813010502.GF7267@brian-ubuntu> (raw)
In-Reply-To: <1376286173-12581-9-git-send-email-b32955@freescale.com>

On Mon, Aug 12, 2013 at 01:42:51PM +0800, Huang Shijie wrote:
> The current mtd_type_show() misses the MTD_MLCNANDFLASH case.
> This patch adds the case for it.
> 
> Signed-off-by: Huang Shijie <b32955@freescale.com>
> ---
>  drivers/mtd/mtdcore.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
> index 6aa952b..c7cee29 100644
> --- a/drivers/mtd/mtdcore.c
> +++ b/drivers/mtd/mtdcore.c
> @@ -157,6 +157,9 @@ static ssize_t mtd_type_show(struct device *dev,
>  	case MTD_UBIVOLUME:
>  		type = "ubi";
>  		break;
> +	case MTD_MLCNANDFLASH:
> +		type = "MLC nand";

The current convention uses lower-case, single-word names. And your
selection isn't very consistent with the SLC NAND case (but I see that
you're trying to change the SLC NAND case). I'd go with "mlc-nand" or
just "mlc".

But more importantly, this is probably a break in ABI. At a minimum,
this needs documentation here in Documentation/ABI. I know tools which
currently check only for "nand", and if the name suddely becomes
different for MLC, that is a breakage.

But really, does user-space need to know SLC vs. MLC? If so, this needs
a clear argument for why in the patch description. Perhaps to
differentiate whether or not JFFS2 support is even possible? I'm not
opposed to adding a new name, especially since the MTD_MLCNANDFLASH
macro has existed in mtd/mtd-abi.h for a long time (but it was rotten).
Just do it sensibly (i.e., better name string, proper ABI documentation
inlcuded in this patch, explain the reason for the ABI addition in this
patch, etc.).

Brian

  reply	other threads:[~2013-08-13  1:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12  5:42 [PATCH 00/10] About the SLC/MLC Huang Shijie
2013-08-12  5:42 ` [PATCH 01/10] mtd: set the cell information for ONFI nand Huang Shijie
2013-08-12  7:22   ` Gupta, Pekon
2013-08-12  7:27     ` Huang Shijie
2013-08-13  0:49     ` Brian Norris
2013-08-13  2:32       ` Huang Shijie
2013-08-13  2:59         ` Brian Norris
     [not found]       ` <5209A1F2.80600@freescale.com>
2013-08-13  3:17         ` Brian Norris
2013-08-13  3:21           ` Huang Shijie
2013-08-13  4:10           ` Gupta, Pekon
2013-08-13  6:19             ` Huang Shijie
2013-08-12  5:42 ` [PATCH 02/10] mtd: add a helper to check the SLC/MLC nand chip Huang Shijie
2013-08-13  0:52   ` Brian Norris
2013-08-13  2:35     ` Huang Shijie
2013-08-13  2:52       ` Brian Norris
2013-08-12  5:42 ` [PATCH 03/10] mtd: print out the cell information for " Huang Shijie
2013-08-12  5:42 ` [PATCH 04/10] mtd: gpmi: rewrite the gpmi_ecc_write_oob() to support the jffs2 Huang Shijie
2013-08-12  5:42 ` [PATCH 05/10] mtd: add more comment for MTD_NANDFLASH/MTD_MLCNANDFLASH Huang Shijie
2013-08-12  5:42 ` [PATCH 06/10] mtd: fix the wrong mtd->type for nand chip Huang Shijie
2013-08-12  5:42 ` [PATCH 07/10] jffs2: init the ret with -EINVAL Huang Shijie
2013-08-12  5:42 ` [PATCH 08/10] mtd: add MTD_MLCNANDFLASH case for mtd_type_show() Huang Shijie
2013-08-13  1:05   ` Brian Norris [this message]
2013-08-13  2:20     ` Huang Shijie
2013-08-13  3:10       ` Brian Norris
2013-08-13  3:18         ` Huang Shijie
2013-08-12  5:42 ` [PATCH 09/10] mtd: add more information for the MTD_NANDFLASH case Huang Shijie
2013-08-13  1:07   ` Brian Norris
2013-08-12  5:42 ` [PATCH 10/10] mtd: add a helper to detect the nand type Huang Shijie

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=20130813010502.GF7267@brian-ubuntu \
    --to=computersforpeace@gmail.com \
    --cc=b32955@freescale.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox