From: Wolfgang Denk Date: Mon, 19 May 2008 00:36:26 +0200 Subject: [U-Boot-Users] [PATCH 04/17] i386: Fix global_data declaration In-Reply-To: Your message of "Sun, 18 May 2008 19:09:46 +0200." <1211130599-28289-5-git-send-email-plagnioj@jcrosoft.com> Message-ID: <20080518223626.6ECAE2476E@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <1211130599-28289-5-git-send-email-plagnioj@jcrosoft.com> you wrote: > Fix a warning type in lib_i386/board.c Um... you not only fix a warning; you change the code pretty heavily. > --- a/lib_i386/board.c > +++ b/lib_i386/board.c > @@ -38,6 +38,9 @@ > #include > #include > > +gd_t gd_data; > +gd_t *gd; > + Please do not name this 'gd_data'; stick with the 'global_data' name. Also be aware that this is dangerous - this way it ends up in the BSS segment which most probably is uninitialized when you acess this data, and gets overwritten with zeroes some time later. Is this really working code? 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 Inside every old person is a young person wondering what happened. - Terry Pratchett, _Moving Pictures_