From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data)
Date: Mon, 03 Jan 2011 17:51:46 +0100 [thread overview]
Message-ID: <20110103165146.395B0CEF7A6@gemini.denx.de> (raw)
In-Reply-To: <1294069652-9114-1-git-send-email-loic.minier@linaro.org>
Dear =?UTF-8?q?Lo=C3=AFc=20Minier?=,
In message <1294069652-9114-1-git-send-email-loic.minier@linaro.org> you wrote:
> The eNET (x86) build fails with "invalid application of 'sizeof' to
> incomplete type 'struct global_data'" because x86 doesn't define
> struct global_data. Change sizeof(struct global_data) to sizeof(gd_t)
> which is always available.
Um... I do not like this change; the resulting code is harder to read.
Can you please change the struct declaration isntead, like this:
diff --git a/arch/i386/include/asm/global_data.h b/arch/i386/include/asm/global_data.h
index e3f8a25..e9000c3 100644
--- a/arch/i386/include/asm/global_data.h
+++ b/arch/i386/include/asm/global_data.h
@@ -35,7 +35,7 @@
#ifndef __ASSEMBLY__
-typedef struct {
+typedef struct global_data {
bd_t *bd;
unsigned long flags;
unsigned long baudrate;
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
"Athens built the Acropolis. Corinth was a commercial city,
interested in purely materialistic things. Today we admire Athens,
visit it, preserve the old temples, yet we hardly ever set foot in
Corinth." - Dr. Harold Urey, Nobel Laureate in chemistry
next prev parent reply other threads:[~2011-01-03 16:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-03 15:47 [U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data) Loïc Minier
2011-01-03 16:35 ` Mike Frysinger
2011-01-03 17:00 ` Loïc Minier
2011-01-03 16:51 ` Wolfgang Denk [this message]
2011-01-03 17:03 ` Loïc Minier
2011-01-03 17:00 ` [U-Boot] [PATCH 2/2] i386: Define struct global_data as on other arches Loïc Minier
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=20110103165146.395B0CEF7A6@gemini.denx.de \
--to=wd@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