From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joakim Tjernlund Date: Wed, 7 Feb 2018 08:34:34 +0000 Subject: [U-Boot] [PATCH v3 09/15] env: Support multiple environments In-Reply-To: <20180207081801.kt2u3d77ure5lvud@flea> References: <844212451999302a41d87526d6616b1af7c781d1.1516723179.git-series.maxime.ripard@free-electrons.com> <64448a79-f856-0cd9-d9b2-a5e29b92d768@de.pepperl-fuchs.com> <1517905247.6070.60.camel@infinera.com> <20180207081801.kt2u3d77ure5lvud@flea> Message-ID: <1517992472.6070.80.camel@infinera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 1970-01-01 at 00:00 +0000, Maxime Ripard wrote: > Hi, > > On Tue, Feb 06, 2018 at 08:20:49AM +0000, Joakim Tjernlund wrote: > > On Thu, 1970-01-01 at 00:00 +0000, Simon Goldschmidt wrote: > > > > ..... > > > > Reviewed-by: Andre Przywara > > > > Reviewed-by: Simon Glass > > > > Signed-off-by: Maxime Ripard > > > > --- > > > > env/env.c | 80 +++++++++++++++++++++++++++++++++++--------------------- > > > > 1 file changed, 50 insertions(+), 30 deletions(-) > > > > > > > > diff --git a/env/env.c b/env/env.c > > > > index 906f28ee50a1..1182fdb545db 100644 > > > > --- a/env/env.c > > > > +++ b/env/env.c > > > > @@ -26,6 +26,41 @@ static struct env_driver *_env_driver_lookup(enum env_location loc) > > > > return NULL; > > > > } > > > > > > > > +static enum env_location env_locations[] = { > > > > Don't use static/global variables. They cause a lot of relocation work/size > > and is less flexible. There is no way to #define ENVL_EEPROM to a function > > when a variable. > > Is that last sentence truncated? > > Can you elaborate a bit more on what is the source of the relocation > issues you're mentionning? Is that because of the section it ends up > in? Mainly that its adds relocation entries that take up space, more space than doing a simple assignment directly in code.