[U-Boot] [PATCH 4/4] IDE: Fix anti-aliasing in cmd_ide.c

Mike Frysinger vapier at gentoo.org
Sat Aug 20 20:10:00 CEST 2011


On Saturday, August 20, 2011 09:28:44 Marek Vasut wrote:
> -	ulong iobuf[ATA_SECTORWORDS];
>  	unsigned char c;
> -	hd_driveid_t *iop = (hd_driveid_t *)iobuf;
> +	hd_driveid_t iop __attribute__((aligned(4)));

gcc takes care of making sure the hd_driveid_t struct has proper alignment on 
the stack.  i see it has at least one unsigned int in there, so that gets you 
4byte alignment.  so drop the attribute.

also, same comment as the other patch ... please change your log/summary to 
say "fix strict aliasing violations".
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110820/97af01ef/attachment.pgp 


More information about the U-Boot mailing list