summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2025-03-27 15:33:12 +0000
committerTom Rini <trini@konsulko.com>2025-04-08 16:23:51 -0600
commit9ce2986e7e57277bac3c528412c0bb4443b7003a (patch)
tree4cc57c1a5435829a9c4a6e7239a7a5ec42dbdee5
parentd29a90c8ce4a2e27f502f5ac5a051f7bcfd66e11 (diff)
cmd: spl: annotate switch/case fallthrough
The argument parsing in the SPL configuration command uses an implicit switch/case fallthrough when dealing with a different number of arguments. Add our "fallthrough;" statement-like macro before the respective labels in the bootm code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--cmd/spl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/spl.c b/cmd/spl.c
index 76fe33762df..379b512f1ff 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -60,8 +60,10 @@ static int call_bootm(int argc, char *const argv[], const char *subcommand[])
switch (argc) {
case 3:
bootm_argv[4] = argv[2]; /* fdt addr */
+ fallthrough;
case 2:
bootm_argv[3] = argv[1]; /* initrd addr */
+ fallthrough;
case 1:
bootm_argv[2] = argv[0]; /* kernel addr */
}