From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] OMAP3 MMC: Fix warning dereferencing type-punned pointer
Date: Sat, 26 Sep 2009 07:44:49 +0200 [thread overview]
Message-ID: <4ABDAA51.5000802@googlemail.com> (raw)
In-Reply-To: <4ABD234C.5080408@windriver.com>
Tom wrote:
> Dirk Behme wrote:
>> Fix warning
>>
>> dereferencing type-punned pointer will break strict-aliasing rules
>>
>> Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
>> CC: Steve Sakoman <sakoman@gmail.com>
>>
>
> This may be improved by consolidating the unions into the omap3 mmc.h file
> and using a pointer to union in the mmc_send_cmd.
Hmmh, I'm not so familiar with unions ;) But moving
union {
unsigned int resp[4];
mmc_resp_r3 r3;
mmc_resp_r6 r6;
} mmc_resp;
and
union {
unsigned int resp[4];
mmc_csd_reg_t Card_CSD;
} mmc_resp;
into the omap3 mmc.h would mean to make them global and to permanently
allocate the space for resp[4]? That is, make local variables
allocated locally (on stack?) move to global variables using
(wasting?) some additional memory? If so, I'd like to keep stuff local
as done by the original version. Sorry if I missed something ;)
Best regards
Dirk
next prev parent reply other threads:[~2009-09-26 5:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 18:30 [U-Boot] [PATCH v2] OMAP3 MMC: Fix warning dereferencing type-punned pointer Dirk Behme
2009-09-25 20:08 ` Tom
2009-09-26 5:44 ` Dirk Behme [this message]
2009-09-26 12:29 ` Tom
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=4ABDAA51.5000802@googlemail.com \
--to=dirk.behme@googlemail.com \
--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