Message ID | 9fc5f9c3d92a45f0603e6e912394655f42e96173.1718716595.git.michal.simek@amd.com |
---|---|
State | Superseded |
Delegated to: | Michal Simek |
Headers | show |
Series | amd: versal2: Use U_BOOT_LONGHELP macro | expand |
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@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@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.
On 6/18/24 16:18, Tom Rini wrote: > 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@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@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. yes there are some more again and as I see even one ours. I will add that checkpatch part to our todo list but no promise. And will fix that others. Thanks, Michal
On Tue, Jun 18, 2024 at 04:23:58PM +0200, Michal Simek wrote: > > > On 6/18/24 16:18, Tom Rini wrote: > > 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@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@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. > > yes there are some more again and as I see even one ours. > I will add that checkpatch part to our todo list but no promise. > And will fix that others. I started fixing them up already, except for the amd ones. When you're able to get the checkpatch.pl part done I appreciate it.
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,
It is defined as __maybe_unused variable which fix issue when long help is disabled. Signed-off-by: Michal Simek <michal.simek@amd.com> --- board/amd/versal2/cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)