[U-Boot] [PATCH v2 1/2] common: command: Use command_ret_t enum values instead of values

Simon Glass sjg at chromium.org
Thu Jun 21 19:45:42 UTC 2018


On 21 June 2018 at 06:58, Michal Simek <michal.simek at xilinx.com> wrote:
> Use enum command_ret_t types in cmd_process_error().
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> Changes in v2:
> - Move adding RET_USAGE to separate patch.
>
>  common/command.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromum.org>


> diff --git a/common/command.c b/common/command.c
> index 52d47c133c3c..a4a8dc601acb 100644
> --- a/common/command.c
> +++ b/common/command.c
> @@ -549,8 +549,8 @@ int cmd_process_error(cmd_tbl_t *cmdtp, int err)
>  {
>         if (err) {
>                 printf("Command '%s' failed: Error %d\n", cmdtp->name, err);
> -               return 1;
> +               return CMD_RET_FAILURE;
>         }
>
> -       return 0;
> +       return CMD_RET_SUCCESS;

I actually thing 0 is fine here. That is the definition of success.

>  }
> --
> 1.9.1
>

Regards,
Simon


More information about the U-Boot mailing list