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

    Simon Glass
     

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 +0200

    mtd: 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

    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

    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

    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

    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

    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

    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

    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

    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

    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

    Maxime Ripard
     

25 Jul, 2016

1 commit


23 Jul, 2016

5 commits


06 May, 2016

1 commit


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

    Bin Meng
     

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

    Simon Glass