[PATCH v2] MTD: modify mtd api to return bitflip info on read operations

Artem Bityutskiy dedekind1 at gmail.com
Mon Dec 5 01:23:50 EST 2011


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?

I apologize for not suggesting this from the very beginning.

Artem.


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? 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.

It would be easier to do if MTD interface had a single entry point,
though.





More information about the linux-mtd mailing list