From: Wolfgang Denk Date: Fri, 10 Sep 2010 19:32:21 +0200 Subject: [U-Boot] [PATCH] Followup fixes on the mtdparts spread patchset In-Reply-To: References: <20100909205001.GA21696@schlenkerla.am.freescale.net> Message-ID: <20100910173221.4D8BC153798@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 Dear Ben Gardiner, In message you wrote: > > It's fine by me but I'm curious: why move the declaration of the stack > variables i and net_size to before the check of the block_isbad > function pointer? Before this change, I think there would be no > allocation of these variables on the stack if the block_isbad function > pointer is null. The optimizer is more clever than you assume. 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 Life is a game. Money is how we keep score. - Ted Turner