From: Mike Dunn <mikedunn@newsguy.com>
To: dedekind1@gmail.com
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Scott Branden <sbranden@broadcom.com>,
Wan ZongShun <mcuos.com@gmail.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Manuel Lauss <manuel.lauss@googlemail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
linux-mtd@lists.infradead.org, Ralf Baechle <ralf@linux-mips.org>,
Jiandong Zheng <jdzheng@broadcom.com>,
Andres Salomon <dilinger@queued.net>,
Olof Johansson <olof@lixom.net>, Jamie Iles <jamie@jamieiles.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Vimal Singh <vimal.newwork@gmail.com>
Subject: Re: [PATCH v2] MTD: modify mtd api to return bitflip info on read operations
Date: Mon, 05 Dec 2011 10:13:53 -0800 [thread overview]
Message-ID: <4EDD09E1.8070207@newsguy.com> (raw)
In-Reply-To: <1323066236.2316.16.camel@koala>
On 12/04/2011 10:23 PM, Artem Bityutskiy wrote:
> On Sat, 2011-12-03 at 12:20 -0800, Mike Dunn wrote:
>> Hi,
>>
>> This patch proposes a change to the mtd API for the purpose of returning to
>> the caller information on the number of bit errors corrected by the ecc
>> facilities of the device during read operations. The affected functions are
>> read() and read_oob().
> Mike,
>
> this is quite big patch, and I've realized that it is difficult to
> review it because of the size. I know I suggested one big patch, but now
> I think we should try to split it, if we can. This way it will also be
> easier to pass through dwmw2 because at the end he is the MTD
> maintainer.
>
> I can see the following parts in your patch:
>
> 1. Mechanical part - no much brains needed, just change prototypes, add
> few comments, add NULL arguments everywhere. This is the biggest part.
>
> 2. Implementation part - should be much smaller - implements
> max_bitflips support in MTD.
>
> Part 2 is interesting to reveiw, and currently part 1 adds so much noise
> that the review becomes difficult. Can you split your patches like that?
OK. But you may still be underestimating the quantity of code that warrants
review. Since we're going back to multiple patches anyway, how about four patches:
1. api change to mtd.h (a few lines just to put the rest in context)
2. nand, onenand
3. mtd infrastructructure: mtdblock, mtdchar, mtdpart, mtdconcat, ...
4. rote changes
Patch 4 will contain nothing beyond function definition changes, and the addition of
if(max_bitflips != NULL)
*max_bitflips = 0;
to the top of the read function. Anything beyond that will go into patch 3.
Patch 4 will include all drivers that are not nand or onenand, since these don't
have ecc (two exceptions being devices/docg3.c and nand/alauda.c, which are are
nand drivers that do not use the nand interface).
Please let me know if that sounds reasonable.
> I apologize for not suggesting this from the very beginning.
No problem. I expected this would be an iterative process and resigned myself
to a lot of tedium :)
>
> P.S. As a side note, I am thinking that with your patch the -EUCLEAN
> return code may go away. It has always been a bit ugly interface anyway.
> What do you think?
I agree. And with the max_bitflips change, it become cruft. The patch required
to accomplish this would not be very large, either.
> My thinking is that we can do this separately later.
> But you need to add assertions like:
>
> WARN_ON(err == -EUCLEAN && max_bitflips == 0);
>
> in interesting places.
OK, I'll include this with the next patch set.
Thanks,
Mike
next prev parent reply other threads:[~2011-12-05 18:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-03 20:20 [PATCH v2] MTD: modify mtd api to return bitflip info on read operations Mike Dunn
2011-12-04 8:43 ` Peter Horton
2011-12-04 13:52 ` Mike Dunn
2011-12-04 14:43 ` Artem Bityutskiy
2011-12-04 14:55 ` Mike Dunn
2011-12-05 6:07 ` Artem Bityutskiy
2011-12-05 16:58 ` Mike Dunn
2011-12-05 17:09 ` Peter Horton
2011-12-05 18:57 ` Mike Dunn
2011-12-06 21:52 ` Robert Jarzmik
2011-12-07 2:16 ` Mike Dunn
2011-12-07 8:01 ` Ricard Wanderlof
2011-12-07 18:32 ` Mike Dunn
2011-12-12 12:48 ` Artem Bityutskiy
2011-12-14 20:46 ` Mike Dunn
2011-12-16 10:09 ` Artem Bityutskiy
2011-12-07 9:42 ` Peter Horton
2011-12-07 18:33 ` Mike Dunn
2011-12-04 14:33 ` Artem Bityutskiy
2011-12-05 6:23 ` Artem Bityutskiy
2011-12-05 18:13 ` Mike Dunn [this message]
2011-12-05 21:16 ` Artem Bityutskiy
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=4EDD09E1.8070207@newsguy.com \
--to=mikedunn@newsguy.com \
--cc=computersforpeace@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dilinger@queued.net \
--cc=dwmw2@infradead.org \
--cc=haojian.zhuang@gmail.com \
--cc=jamie@jamieiles.com \
--cc=jdzheng@broadcom.com \
--cc=kyungmin.park@samsung.com \
--cc=lars@metafoo.de \
--cc=linux-mtd@lists.infradead.org \
--cc=manuel.lauss@googlemail.com \
--cc=mcuos.com@gmail.com \
--cc=olof@lixom.net \
--cc=ralf@linux-mips.org \
--cc=robert.jarzmik@free.fr \
--cc=sbranden@broadcom.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=vimal.newwork@gmail.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 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.