From: Huang Shijie <b32955@freescale.com>
To: "Gupta, Pekon" <pekon@ti.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"dedekind1@gmail.com" <dedekind1@gmail.com>
Subject: Re: [PATCH v3 3/6] mtd: set the ecc step size for master/slave mtd_info
Date: Mon, 12 Aug 2013 16:28:01 +0800 [thread overview]
Message-ID: <52089C91.4090903@freescale.com> (raw)
In-Reply-To: <20980858CB6D3A4BAE95CA194937D5E73E9F2A32@DBDE04.ent.ti.com>
于 2013年08月12日 15:00, Gupta, Pekon 写道:
>> Set the ecc step size for master/slave mtd_info{}.
>>
>> Signed-off-by: Huang Shijie<b32955@freescale.com>
>> ---
>> drivers/mtd/mtdpart.c | 1 +
>> drivers/mtd/nand/nand_base.c | 1 +
>> 2 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
>> index 3014933..63b42a6 100644
>> --- a/drivers/mtd/mtdpart.c
>> +++ b/drivers/mtd/mtdpart.c
>> @@ -516,6 +516,7 @@ static struct mtd_part *allocate_partition(struct
>> mtd_info *master,
>> }
>>
>> slave->mtd.ecclayout = master->ecclayout;
>> + slave->mtd.ecc_step = master->ecc_step;
>> slave->mtd.ecc_strength = master->ecc_strength;
>> slave->mtd.bitflip_threshold = master->bitflip_threshold;
>>
>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> index 8f04fb0..6e4095d 100644
>> --- a/drivers/mtd/nand/nand_base.c
>> +++ b/drivers/mtd/nand/nand_base.c
>> @@ -3788,6 +3788,7 @@ int nand_scan_tail(struct mtd_info *mtd)
>> /* propagate ecc info to mtd_info */
>> mtd->ecclayout = chip->ecc.layout;
>> mtd->ecc_strength = chip->ecc.strength;
>> + mtd->ecc_step = chip->ecc.size;
> [Pekon]: Sorry for noticing this lately..
> But do you really want to name ecc.*size* as *ecc_step* ?
Please see :
http://lists.infradead.org/pipermail/linux-mtd/2013-May/046928.html
Artem thought the ecc_step is more proper.
> Wouldn't it be better to follow same nomenclature everywhere ?
> Like ' mtd->ecc_size = chip.ecc.size;'
>
> Because we also have ecc.steps as another parameter here.
there is no need to expose the ecc.steps to use space.
Since the user can get the ecc_step, and pagesize, they can get the
ecc.steps by:
(pagesize / ecc_step).
thanks
Huang Shijie
> And someone might want to expose it in user-space later.
> (Just a naming change requested here to keep things in sync..)
next prev parent reply other threads:[~2013-08-12 8:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 5:24 [PATCH v3 0/6] Export the ECC step size to user applications Huang Shijie
2013-08-12 5:24 ` [PATCH v3 1/6] mtd: add a new field to mtd_info{} Huang Shijie
2013-08-12 5:24 ` [PATCH v3 2/6] mtd: add a new sys node to show the ecc step size Huang Shijie
2013-08-12 5:24 ` [PATCH v3 3/6] mtd: set the ecc step size for master/slave mtd_info Huang Shijie
2013-08-12 7:00 ` Gupta, Pekon
2013-08-12 8:28 ` Huang Shijie [this message]
2013-08-12 9:24 ` Gupta, Pekon
2013-08-12 9:44 ` Huang Shijie
2013-08-13 0:25 ` Brian Norris
2013-08-13 4:29 ` Gupta, Pekon
2013-08-13 6:14 ` Huang Shijie
2013-08-17 18:58 ` Brian Norris
2013-08-12 5:24 ` [PATCH v3 4/6] mtd: set ONFI nand's default hooks in nand_set_defaults() Huang Shijie
2013-08-12 5:24 ` [PATCH v3 5/6] mtd: gpmi: remove the nand_scan() Huang Shijie
2013-08-12 5:24 ` [PATCH v3 6/6] mtd: update the ABI document about the ecc step 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=52089C91.4090903@freescale.com \
--to=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pekon@ti.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