[PATCH,RFC] [MTD] replace MTD_NORFLASH with MTD_GENERIC_TYPE

Artem B. Bityutskiy dedekind at infradead.org
Tue May 30 12:01:33 EDT 2006


On Tue, 2006-05-30 at 17:50 +0200, Jörn Engel wrote:
> Until recently, we had four different variants of jffs2 wbuf code,
> depending on the flash type.  I fail to see the difference between
> those four and have already merged two of them.  Unless I am missing
> something important, the other three can also be combined into one.
> 
> But doing so would result in something like
> 	if ((mtd->type == MTD_NAND) || (mtd->type == MTD_SIBLEY) ||
> 			(mtd->type == MTD_ECCNOR) ||
> 			(mtd->type == MTD_DATAFLASH))
> 
> Or, more realistically, in something like the recent situation, where
> each one of those cases had its own copy of special code because
> people don't realize that their type is no different from another
> long-merged type.  Note that Nico didn't notice and copied the ECC_NOR
> code almost verbatim.  Considering that he is a solid developer
> otherwise, what would an average or below-average hacker come up with?

I'm absolutely against this trend. You'll soon make all flashes of
MTD_GENERIC_TYPE, then you'll remove mtd->type altogether.

We debated about this a lot. And you still didn't explain why I have no
right to know the  flash type.

Please, introduce your capabilities stuff, but please, stop removing
mtd->type implicitly or explicitly. 

AFAICS, what you're doing now is you're introducing reasonable
"capabilities" stuff, and slowly removing the mtd->type stuff. Please,
do one thing.

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.





More information about the linux-mtd mailing list