[U-Boot] [PATCH v2] fat: fix unaligned errors

Wolfgang Denk wd at denx.de
Sat Jan 24 02:03:53 CET 2009


Dear Mike Frysinger,

In message <1230947265-19412-1-git-send-email-vapier at gentoo.org> you wrote:
> From: Bryan Wu <bryan.wu at analog.com>
> 
> A couple of buffers in the fat code are declared as an array of bytes.  But
> it is then cast up to a structure with 16bit and 32bit members.  Since GCC
> assumes structure alignment here, we have to force the buffers to be
> aligned according to the structure usage.
> 
> Signed-off-by: Bryan Wu <bryan.wu at analog.com>
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
> v1
> 	- use alignof() rather than sizeof()
> 
>  fs/fat/fat.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There is such a fine line between genius and stupidity."
- David St. Hubbins, "Spinal Tap"


More information about the U-Boot mailing list