31 Oct, 2019

1 commit

  • In cmd/regulator.c an error occurs with GCC 9.2.1 if CONFIG_ERRNO_STR is
    not defined:

    cmd/regulator.c: In function ‘failure’:
    cmd/regulator.c:20:2: error: ‘%s’ directive argument is null
    [-Werror=format-overflow=]
    20 | printf("Error: %d (%s)\n", ret, errno_str(ret));
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In function ‘constraint’,
    inlined from ‘constraint’ at cmd/regulator.c:111:12:
    cmd/regulator.c:115:3: error: ‘%s’ directive argument is null
    [-Werror=format-overflow=]
    115 | printf(" %s (err: %d)\n", errno_str(val), val);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    errno_str() should return a valid string instead of NULL if
    CONFIG_ERRNO_STR is not defined.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

24 Sep, 2016

1 commit


06 Jul, 2016

2 commits


12 Dec, 2014

1 commit

  • The functions error's numbers are standarized - but the error
    messages are not.

    The errors are often handled with unclear error messages,
    so why not use an errno standarized messages.

    Advantages:
    - This could decrease the binary size.
    - Appended with a detailed information,
    the error message will be clear.

    This commit introduces new function:
    - const char *errno_to_str(int errno)

    The functions returns a pointer to the errno corresponding text message:
    - if errno is null or positive number - a pointer to "Success" message
    - if errno is negative - a pointer to errno related message

    Signed-off-by: Przemyslaw Marczak
    Reviewed-by: Tom Rini

    Przemyslaw Marczak
     

20 Sep, 2010

1 commit