[PATCH] Add Amstrad Delta NAND support.

Segher Boessenkool segher at kernel.crashing.org
Fri May 19 20:10:57 EDT 2006


>>>> And please create a structure containing both struct mtd_info and
>>>> struct nand_chip.  Then use sizeof(that structure)...

> It's fine as-is. The claim that it's nicer to introduce an extra
> datatype just for the allocation is subjective, at best.

Not just for the allocation, but also for getting the address of
the second struct, after that allocation.

If the second struct has bigger alignment required than the first,
the current code gets the second struct misaligned.  Putting both
into one bigger struct would add the required padding.

(Say: sizes 4 and 8, alignment requirements 4 and 8 resp.)


Segher





More information about the linux-mtd mailing list