From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 02 Dec 2010 13:33:47 +0100 Subject: [U-Boot] [PATCH] omap3evm: Clean-up EVM detection code. In-Reply-To: <20101202120141.30416EA6600@gemini.denx.de> References: <1291288812-12653-1-git-send-email-premi@ti.com> <20101202113726.2C683EA6600@gemini.denx.de> <4CF7896B.5090007@free.fr> <20101202120141.30416EA6600@gemini.denx.de> Message-ID: <4CF7922B.3020504@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 02/12/2010 13:01, Wolfgang Denk a ?crit : > Dear Albert ARIBAUD, > > In message<4CF7896B.5090007@free.fr> you wrote: >> >> Note that initialization should be unnecessary if the static variable is >> int rather than u8. > > It should ALWAYS be not necessary. I understand your point re: the linker warning, i.e. initializing should never be done to just get rid of a warning. > Otherwise we have a bug, and that bug needs to be fixed rather than > papered over. Yes, there is a bug whereby an u8 BSS variable causes a linker warning, and I believe this bug to be with the linker -- I'm working on getting a minimal example of it so that I could completely verify that the warning does not affect the semantics of the code generated. Now, on an unrelated note, omap3_emv's code arbitrarily uses an u8 where an int (or enum) would be more appropriate, and this should be changed not because it removes a linker warning, but because the u8 choice is arbitrary and at best as effective as using an int, at worst suboptimal to that. > Best regards, > > Wolfgang Denk Amicalement, -- Albert.