[PATCH] amd: versal2: Use U_BOOT_LONGHELP macro

Tom Rini trini at konsulko.com
Tue Jun 18 16:18:39 CEST 2024


On Tue, Jun 18, 2024 at 03:16:38PM +0200, Michal Simek wrote:

> It is defined as __maybe_unused variable which fix issue when long help is
> disabled.
> 
> Signed-off-by: Michal Simek <michal.simek at amd.com>
> ---
> 
>  board/amd/versal2/cmds.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/board/amd/versal2/cmds.c b/board/amd/versal2/cmds.c
> index fbd99918a7f4..56ae39bc6a1e 100644
> --- a/board/amd/versal2/cmds.c
> +++ b/board/amd/versal2/cmds.c
> @@ -71,10 +71,9 @@ static int do_versal2_load_pdi(struct cmd_tbl *cmdtp, int flag, int argc,
>  	return cmd_process_error(cmdtp, ret);
>  }
>  
> -static char versal2_help_text[] =
> +U_BOOT_LONGHELP(versal2,
>  	"loadpdi addr len - Load pdi image\n"
> -	"load pdi image at ddr address 'addr' with pdi image size 'len'\n"
> -;
> +	"load pdi image at ddr address 'addr' with pdi image size 'len'\n");
>  
>  U_BOOT_CMD_WITH_SUBCMDS(versal2, "Versal Gen 2 sub-system", versal2_help_text,
>  			U_BOOT_SUBCMD_MKENT(loadpdi, 3, 1,

Reviewed-by: Tom Rini <trini at konsulko.com>

Ah, any chance you can work up something to checkpatch to catch that? I
had gone through a while ago and fixed up the cases which should have
been using that macro but I see a few more have slipped in, again.


-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240618/70fc2c8c/attachment.sig>


More information about the U-Boot mailing list