From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: cfi_flash: Fix unaligned accesses to cfi_qry structure
Date: Wed, 8 May 2013 19:26:01 +0200 [thread overview]
Message-ID: <201305081926.01516.marex@denx.de> (raw)
In-Reply-To: <1367228070-6351-1-git-send-email-andrew_gabbasov@mentor.com>
Dear Andrew Gabbasov,
> Packed structure cfi_qry contains unaligned 16- and 32-bits members,
> accessing which causes problems when cfi_flash driver is compiled with
> -munaligned-access option: flash initialization hangs, probably
> due to data error.
>
> This fix converts 16- and 32-bit members to byte arrays and uses special
> macros to access such fields. It removes possible unaligned accesses
> in cfi_flash driver.
>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
It seems OK. I just wonder if the le16_to_cpu you removed can have no impact now
on obscure-endian architectures, that's my only concern.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-05-08 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 9:34 [U-Boot] [PATCH] ARM: cfi_flash: Fix unaligned accesses to cfi_qry structure Andrew Gabbasov
2013-04-29 9:45 ` Gabbasov, Andrew
2013-05-08 17:26 ` Marek Vasut [this message]
2013-05-08 17:38 ` Gabbasov, Andrew
2013-05-10 10:13 ` [U-Boot] " Masahiro Yamada
2013-05-10 12:36 ` Marek Vasut
2013-05-13 2:25 ` Masahiro Yamada
2013-05-13 3:37 ` Marek Vasut
2013-05-13 6:48 ` Albert ARIBAUD
2013-05-14 17:27 ` Gabbasov, Andrew
2013-05-22 15:12 ` Gabbasov, Andrew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201305081926.01516.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox