[U-Boot] [PATCH] Followup fixes on the mtdparts spread patchset
Ben Gardiner
bengardiner at nanometrics.ca
Fri Sep 10 18:49:55 CEST 2010
On Fri, Sep 10, 2010 at 12:32 PM, Scott Wood <scottwood at freescale.com> wrote:
> On Fri, 10 Sep 2010 10:35:04 -0400
> Ben Gardiner <bengardiner at nanometrics.ca> 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?
>
> U-Boot coding style prohibits mid-block declarations.
>
>> 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 change should not make any difference in the generated code. The
> compiler is not going to delay its creation of the stack frame just
> because of where the variables are declared.
Ok. I understand now; thank you for clearing that up, Scott.
Best Regards,
Ben Gardiner
---
Nanometrics Inc.
http://www.nanometrics.ca
More information about the U-Boot
mailing list