All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] avb: fix missing break in avb_set_state() switch
@ 2026-09-01 10:19 Naveen Kumar Chaudhary
  2026-09-01 13:41 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Naveen Kumar Chaudhary @ 2026-09-01 10:19 UTC (permalink / raw)
  To: mkorpershoek, igor.opaniuk, trini; +Cc: u-boot

The AVB_ORANGE case fell through into AVB_RED due to a missing break.
It happened to be harmless since AVB_RED only breaks, but it trips
-Wimplicit-fallthrough and is fragile against future changes. Add the
missing break.

Fixes: 5d4fd877733 ("avb2.0: add boot states and dm-verity support")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
---
 common/avb_verify.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/avb_verify.c b/common/avb_verify.c
index b96cd1ebd7b..09f1534c3cc 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -198,6 +198,7 @@ char *avb_set_state(AvbOps *ops, enum avb_boot_state boot_state)
 		break;
 	case AVB_ORANGE:
 		cmdline = "androidboot.verifiedbootstate=orange";
+		break;
 	case AVB_RED:
 		break;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] avb: fix missing break in avb_set_state() switch
  2026-09-01 10:19 [PATCH] avb: fix missing break in avb_set_state() switch Naveen Kumar Chaudhary
@ 2026-09-01 13:41 ` Simon Glass
  2026-09-02 12:39 ` Mattijs Korpershoek
  2026-09-09  9:05 ` Mattijs Korpershoek
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2026-09-01 13:41 UTC (permalink / raw)
  To: naveen.osdev; +Cc: mkorpershoek, igor.opaniuk, trini, u-boot

On 2026-09-01T10:19:24, Naveen Kumar Chaudhary <naveen.osdev@gmail.com> wrote:
> avb: fix missing break in avb_set_state() switch
>
> The AVB_ORANGE case fell through into AVB_RED due to a missing break.
> It happened to be harmless since AVB_RED only breaks, but it trips
> -Wimplicit-fallthrough and is fragile against future changes. Add the
> missing break.
>
> Fixes: 5d4fd877733 ("avb2.0: add boot states and dm-verity support")
> Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
>
> common/avb_verify.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] avb: fix missing break in avb_set_state() switch
  2026-09-01 10:19 [PATCH] avb: fix missing break in avb_set_state() switch Naveen Kumar Chaudhary
  2026-09-01 13:41 ` Simon Glass
@ 2026-09-02 12:39 ` Mattijs Korpershoek
  2026-09-09  9:05 ` Mattijs Korpershoek
  2 siblings, 0 replies; 4+ messages in thread
From: Mattijs Korpershoek @ 2026-09-02 12:39 UTC (permalink / raw)
  To: Naveen Kumar Chaudhary, igor.opaniuk, trini; +Cc: u-boot

Hi Naveen,

Thank you for the patch.

On Tue, Sep 01, 2026 at 15:49, Naveen Kumar Chaudhary <naveen.osdev@gmail.com> wrote:

> The AVB_ORANGE case fell through into AVB_RED due to a missing break.
> It happened to be harmless since AVB_RED only breaks, but it trips
> -Wimplicit-fallthrough and is fragile against future changes. Add the
> missing break.
>
> Fixes: 5d4fd877733 ("avb2.0: add boot states and dm-verity support")
  Fixes: 5d4fd877733 ("avb2.0: add boot states and dm-verity support")

Checkpatch.pl seems to warn here:

$ ./scripts/checkpatch.pl --git HEAD^..HEAD
WARNING: Please use correct Fixes: style 'Fixes: <12+ chars of sha1> ("<title line>")' - ie: 'Fixes: 5d4fd8777337 ("avb2.0: add boot states and dm-verity support")'
#11: 

So please replace this with:

Fixes: 5d4fd8777337 ("avb2.0: add boot states and dm-verity support")

(there is a missing '7' at the end of the sha1 in the original commit message)

Do you want to send a v2 with this fixed, or should I do the commit
message fixup when merging the patch into my tree?

> Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
> ---
>  common/avb_verify.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/common/avb_verify.c b/common/avb_verify.c
> index b96cd1ebd7b..09f1534c3cc 100644
> --- a/common/avb_verify.c
> +++ b/common/avb_verify.c
> @@ -198,6 +198,7 @@ char *avb_set_state(AvbOps *ops, enum avb_boot_state boot_state)
>  		break;
>  	case AVB_ORANGE:
>  		cmdline = "androidboot.verifiedbootstate=orange";
> +		break;

The change looks good to me, so:

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>

>  	case AVB_RED:
>  		break;
>  	}
> -- 
> 2.43.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] avb: fix missing break in avb_set_state() switch
  2026-09-01 10:19 [PATCH] avb: fix missing break in avb_set_state() switch Naveen Kumar Chaudhary
  2026-09-01 13:41 ` Simon Glass
  2026-09-02 12:39 ` Mattijs Korpershoek
@ 2026-09-09  9:05 ` Mattijs Korpershoek
  2 siblings, 0 replies; 4+ messages in thread
From: Mattijs Korpershoek @ 2026-09-09  9:05 UTC (permalink / raw)
  To: igor.opaniuk, trini, Naveen Kumar Chaudhary; +Cc: u-boot

Hi,

On Tue, 01 Sep 2026 15:49:24 +0530, Naveen Kumar Chaudhary wrote:
> The AVB_ORANGE case fell through into AVB_RED due to a missing break.
> It happened to be harmless since AVB_RED only breaks, but it trips
> -Wimplicit-fallthrough and is fragile against future changes. Add the
> missing break.

Thanks, Applied to https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/1] avb: fix missing break in avb_set_state() switch
      https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/0802a621ffe504742458af95ffa79e161047a148

--
Mattijs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-09  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 10:19 [PATCH] avb: fix missing break in avb_set_state() switch Naveen Kumar Chaudhary
2026-09-01 13:41 ` Simon Glass
2026-09-02 12:39 ` Mattijs Korpershoek
2026-09-09  9:05 ` Mattijs Korpershoek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.