Re: [PATCH/RFC] MTD: Striping layer core

Jörn Engel
2006-04-03T13:20:15Z

On Mon, 3 April 2006 15:06:19 +0200, Jörn Engel wrote:
>
> As a step in that direction, please take a look at this patchset:
> http://wh.fh-wedel.de/~joern/mtd_type.tgzwh.fh-wedel.de/~joern/mtd_type.tgz

Taking a closer look at the code, reader should notice three
interesting things, btw:

1. Nico is a lazy moron,
2. Artem is a lazy moron and
3. Jörn is a lazy moron.

Nico, you didn't notice that the Sibley flashes are just another
iteration of ST's ECC NOR flashes. Special code for both flash types
is nearly identical, except for the field used to store the writesize
in struct mtd_info.

Artem, you didn't notice that Dataflash has the exact same cleanup
routine as ECC NOR and NAND flash has. And for the initialization
code, that could be shared as well.

Jörn, I didn't notice that ECC NOR has the exact same cleanup routine
as NAND flash. And for the initialization code, that could be shared
as well.

Overall, JFFS2 currently has four sets of special setup/cleanup code
for NAND, ECC NOR, Dataflash and Sibley. Simply because the three of
us were too lazy to read the existing code and didn't notice. Noone
else seemed to have noticed either, so the "lazy moron" thing seems to
be fairly universal. Don't take it as an insult, but rather as a
statement about human nature (and a trick to attract attention).

Nico, can you take a close look at the Sibley part of the patches and
checker whether I broke anything? Combining ECC NOR and Sibley was
the low hanging fruit, so I already picked it. Combining the three
remaining sets is harder. Maybe someone else is feeling the urge to
combine those.

Jörn

--
He who knows that enough is enough will always have enough.
-- Lao Tsu