diff options
author | Manoj Gupta <manojgupta@google.com> | 2019-11-04 17:17:39 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-01 03:54:08 +0000 |
commit | 6208b9aa9c4e8b7c9ff8063965c9f9aa519c1740 (patch) | |
tree | 66f3e866b0348c5d5940a9a97fd4159a24b44855 /firmware/lib | |
parent | 0e97e25e85f0499e23b09a31a2c7116759f191d5 (diff) | |
download | vboot-6208b9aa9c4e8b7c9ff8063965c9f9aa519c1740.tar.gz |
Reland: Clean up implicit fall through.
Directly use the __attribute__ ((fallthrough)) instead of
a macro.
This was suggested in CL:1772474.
BUG=chromium:997709
TEST=CQ
BRANCH=None
Change-Id: Ifcdcd3822eddea41aeb88f4a55bd09aa483f6054
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2031766
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'firmware/lib')
-rw-r--r-- | firmware/lib/cgptlib/cgptlib.c | 2 | ||||
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 2 | ||||
-rw-r--r-- | firmware/lib/vboot_ui.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/firmware/lib/cgptlib/cgptlib.c b/firmware/lib/cgptlib/cgptlib.c index 7803a7e9..db704b54 100644 --- a/firmware/lib/cgptlib/cgptlib.c +++ b/firmware/lib/cgptlib/cgptlib.c @@ -143,8 +143,8 @@ int GptUpdateKernelWithEntry(GptData *gpt, GptEntry *e, uint32_t update_type) break; } /* Out of tries, so drop through and mark partition bad. */ + __attribute__ ((fallthrough)); } - VBOOT_FALLTHROUGH; case GPT_UPDATE_ENTRY_BAD: { /* Giving up on this partition entirely. */ if (!GetEntrySuccessful(e)) { diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 24b63c43..5139ba33 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -353,7 +353,7 @@ vb2_error_t vb2_commit_data(struct vb2_context *ctx) default: VB2_DEBUG("unknown commit error: %#x\n", rv); - VBOOT_FALLTHROUGH; + __attribute__ ((fallthrough)); case VB2_ERROR_NV_WRITE: if (!(ctx->flags & VB2_CONTEXT_RECOVERY_MODE)) diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c index 55b09e94..debe2a8b 100644 --- a/firmware/lib/vboot_ui.c +++ b/firmware/lib/vboot_ui.c @@ -260,7 +260,7 @@ static vb2_error_t vb2_enter_vendor_data_ui(struct vb2_context *ctx, return VB2_SUCCESS; case 'a'...'z': key = toupper(key); - VBOOT_FALLTHROUGH; + __attribute__ ((fallthrough)); case '0'...'9': case 'A'...'Z': if ((len > 0 && is_vowel(key)) || @@ -585,7 +585,7 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx) /* Only disable virtual dev switch if allowed by GBB */ if (!(gbb->flags & VB2_GBB_FLAG_ENTER_TRIGGERS_TONORM)) break; - VBOOT_FALLTHROUGH; + __attribute__ ((fallthrough)); case ' ': /* See if we should disable virtual dev-mode switch. */ VB2_DEBUG("sd->flags=%#x\n", sd->flags); |