01 Feb, 2018
2 commits
-
There is more common code in mmc, nand and ubi env drivers that
can be shared by moving to env_import_redund.For this, a status/error value whether the buffers were loaded
are passed as additional parameters to env_import_redund.
Ideally, these are already returned to the env driver by the
storage driver. This is the case for mmc, nand and ubi, so for
this change, code deduplicated.Signed-off-by: Simon Goldschmidt
Acked-by: Maxime Ripard -
env_import (and env_import_redund) currently return 1 on success
and 0 on error. However, they are only used from functions
returning 0 on success or a negative value on error.Let's clean this up by making env_import and env_import_redund
return 0 on success and -EIO on error (as was the case for all
users before).Users that cared for the return value are also updated. Funny
enough, this only affects onenand.c and sf.cSigned-off-by: Simon Goldschmidt
Acked-by: Maxime Ripard
27 Jan, 2018
1 commit
-
Since we have global messages to indicate what's going on, the custom
messages in the environment drivers only make the output less readable.Make the common code play a little nicer by removing all the extra output
in the standard case.Reviewed-by: Andre Przywara
Reviewed-by: Simon Glass
Signed-off-by: Maxime Ripard
21 Nov, 2017
1 commit
-
This support has been deprecated since v2017.09 due to security issues.
We now remove this support.Signed-off-by: Tom Rini
04 Oct, 2017
1 commit
-
U-Boot widely uses error() as a bit noisier variant of printf().
This macro causes name conflict with the following line in
include/linux/compiler-gcc.h:# define __compiletime_error(message) __attribute__((error(message)))
This prevents us from using __compiletime_error(), and makes it
difficult to fully sync BUILD_BUG macros with Linux. (Notice
Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)Let's convert error() into now treewide-available pr_err().
Done with the help of Coccinelle, excluing tools/ directory.
The semantic patch I used is as follows:
//
@@@@
-error
+pr_err
(...)
//Signed-off-by: Masahiro Yamada
Reviewed-by: Simon Glass
[trini: Re-run Coccinelle]
Signed-off-by: Tom Rini
21 Aug, 2017
1 commit
-
Some of these were missed in the conversion.
Signed-off-by: Simon Glass
16 Aug, 2017
5 commits
-
We are now using an env_ prefix for environment functions. Rename these
other functions as well, for consistency:getenv_vlan()
getenv_bootm_size()
getenv_bootm_low()
getenv_bootm_mapsize()
env_get_default()Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass -
We are now using an env_ prefix for environment functions. Rename these
for consistency. Also add function comments in common.h.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass -
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass -
This is a strange name for a function that loads the environment. There is
now only one implementation of this function, so use the new env_load()
function directly instead.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
We only have a single implementation of this function now and it is called
env_get_char(). Drop the old function and the weak version.Reviewed-by: Tom Rini
Signed-off-by: Simon Glass
15 Aug, 2017
6 commits
-
This function is the same as env_get_char_spec() apart from dropping the
brackets. Drop the brackets from env_get_char_spec() and use that instead
of env_get_char_memory().Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
This function does nothing but call env_get_char_spec(). Drop it and
adjust its only caller.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
The check for gd->env_valid is used in both the 'if' and 'else' part of
env_get_char(). Move it into that function instead for simplicity. Drop
that code from the two leaf functions.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
This function is not used anywhere other than env_get_char(). Move the
code into that function.Reviewed-by: Tom Rini
Signed-off-by: Simon Glass -
These functions are not used outside this file. Make them static and order
them to avoid forward declarations.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
About a quarter of the files in common/ relate to the environment. It
seems better to put these into their own subdirectory and remove the
prefix.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini