Re: [PATCH] Add Amstrad Delta NAND support.

From: Segher Boessenkool
Date: Fri May 19 2006 - 20:10:55 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/