Re: drivers/block/ub.c
From: Roman Zippel
Date:  Mon Jul 05 2004 - 05:02:57 EST
Hi,
On Mon, 28 Jun 2004, David S. Miller wrote:
> You have not considered what is supposed to happen when this
> structure is embedded within another one.  What kind of alignment
> rules apply in that case?  For example:
> 
> struct foo {
> 	u32	x;
> 	u8	y;
> 	u16	z;
> } __attribute__((__packed__));
> 
> struct bar {
> 	u8		a;
> 	struct foo 	b;
> };
Could it be possible to combine it with an aligned attribute?
For example HFS has a few structures that need the packed attribute, on 
the other hand all structures are at least on a 16 bit boundary, 
generating byte access is currently overkill there, but splitting 32bit 
accesses into two 16bit accesses would be acceptable.
bye, Roman
-
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/