[PATCH v4 1/5] command: Use a constant pointer for the help

Simon Glass sjg at chromium.org
Wed Nov 24 18:47:44 CET 2021


On 9/19/21 23:49, Simon Glass wrote:
> This text should never change during execution, so it makes sense to
> use a const char * so that it can be declared as const in the code.
> Update struct cmd_tbl with a const char * pointer for 'help'.
>
> We cannot make usage const because of the bmode command, used on mx53ppd
> for example.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

> ---
>
> (no changes since v2)
>
> Changes in v2:
> - Explain why 'usage' cannot be const
>
>   include/command.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list