08 Dec, 2017
1 commit
-
The debug() macro now evaluates its expression so does not need #ifdef
protection. In fact the current code causes a warning with the new log
implementation. Adjust the code to fix this.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
04 Dec, 2017
1 commit
-
This header was renamed to rawnand.h in Linux.
The following is the corresponding commit in Linux.
commit d4092d76a4a4e57b65910899948a83cc8646c5a5
Author: Boris Brezillon
Date: Fri Aug 4 17:29:10 2017 +0200mtd: nand: Rename nand.h into rawnand.h
We are planning to share more code between different NAND based
devices (SPI NAND, OneNAND and raw NANDs), but before doing that
we need to move the existing include/linux/mtd/nand.h file into
include/linux/mtd/rawnand.h so we can later create a nand.h header
containing all common structure and function prototypes.Signed-off-by: Masahiro Yamada
27 Aug, 2017
2 commits
-
When reworking this code to fix other issues found by Coverity, I forgot
to ensure tmp_ep was always cleared before use.Reported-by: Coverity (CID: 166612)
Fixes: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity")
Signed-off-by: Tom Rini -
As part of fixing the previously reported issues, it was missed that in
the case of mtdparts_init() we need to make sure that tmp_ep is long
enough to contain PARTITION_MAXLEN and a NULL termination. Then, to be
sure the buffer is NULL terminated, zero the entire buffer rather than
just ensuring the first character is NULL.Cc: Lothar Waßmann
Cc: Maxime Ripard
Reported-by: Coverity (CID: 166329)
Signed-off-by: Tom Rini
20 Aug, 2017
1 commit
-
Now that sandbox is building cmd/mtdparts.c Coverity has looked at the
code and found a number of issues. In index_partitions() it is possible
that part will be NULL, so re-work the checks and debug statements to
take this into account. We have a number of string buffers that we
print to in the exact size of, and use string functions on, so we need
to ensure they are large enough to be NULL terminated. In
device_parse() it is not possible for num_partitions to be 0 (we would
have hit a different error first) so remove logically dead code.
Finally, in parse_mtdparts() if we have an error we need to free the
memory allocated to dev.Cc: Lothar Waßmann
Cc: Maxime Ripard
Reported-by: Coverity (CID: 166334, 166333, 166332, 166329, 166328)
Signed-off-by: Tom Rini
16 Aug, 2017
4 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
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 -
We are now using an env_ prefix for environment functions. Rename these
commonly used functions, 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 setenv()
for consistency. Also add function comments in common.h.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass
12 Jun, 2017
1 commit
-
commit 06a040a31bcf ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts")
removed the initialization of a pointer variable, which is
subsequently used in a debug() call. This produces an uninitialized
variable warning, when compiling with DEBUG defined.Signed-off-by: Lothar Waßmann
07 Apr, 2017
1 commit
-
CMD_MTDPARTS is something the user might or might not want to select, and
might depends on (or be selected by) other options too.This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that
might change from one board to another, or from one user to the other,
depending on what it expects and what storage devices are available.In order to ease that configuration, add those options to Kconfig.
Signed-off-by: Maxime Ripard
Reviewed-by: Tom Rini
Reviewed-by: Jagan Teki
25 Jul, 2016
1 commit
-
- add missing declaration
- update debug output format specifiersSigned-off-by: Steve Rae
23 Jul, 2016
5 commits
-
Some CPUs contains boot ROM code capable reading first few blocks
(where SPL resides) of NAND flash and executing it. It is wise to
create separate partition here for SPL. As block size depends on
NAND chip used, we could either use worst case (biggest) partition
size or base its size on actual block size. This patch adds support
for the latter option.Signed-off-by: Ladislav Michl
-
Boards which are defining default mtdparts often need them early
in boot process (to load environment from UBI volume, for example).
This is currently solved by adding mtdparts and mtdids variable
definitions also to default environment. With this change, default
partitions are used by default unless explicitely deleted or
redefined.Signed-off-by: Ladislav Michl
-
Signed-off-by: Ladislav Michl
-
In case there is no mtdparts variable in relocated environment,
NULL is assigned to p, which is later fed to strncpy.
Also function parameter mtdparts is completely ignored, so use it
in case mtdparts variable is not found in environment. This
parameter is checked not to be NULL in caller.Signed-off-by: Ladislav Michl
-
A private buffer is used to read mtdparts variable from non-relocated
environment. A pointer to that buffer is returned unconditionally,
confusing later test for variable presence in the environment.
Fix it by returning NULL when getenv_f fails.Signed-off-by: Ladislav Michl
06 May, 2016
1 commit
-
Spelling corrections for (among other things):
* environment
* override
* variable
* ftd (should be "fdt", for flattened device tree)
* embedded
* FTDI
* emulation
* controller
06 Feb, 2016
1 commit
-
Correct spelling of "U-Boot" shall be used in all written text
(documentation, comments in source files etc.).Signed-off-by: Bin Meng
Reviewed-by: Heiko Schocher
Reviewed-by: Simon Glass
Reviewed-by: Minkyu Kang
25 Jan, 2016
1 commit
-
Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Reviewed-by: Heiko Schocher
Acked-by: Stefan Roese
Acked-by: Przemyslaw Marczak