diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-09-20 15:19:40 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-21 01:28:52 +0000 |
commit | 242a8ecb5c720f6e008f3c1af9ab5703f15b6f13 (patch) | |
tree | d996ab18992be9bdcde1744e91f5c5718da3a992 | |
parent | 2776eb7a6294fcb360124355a7bab59aa4bc888c (diff) | |
download | chrome-ec-242a8ecb5c720f6e008f3c1af9ab5703f15b6f13.tar.gz |
ec: Mark some unreachable code with lcov excl
The functions boot_mode_to_string() and set_boot_mode() with LCOV_EXCL
because they are impossible to reach. The alternative would be to delete
the code, but there is already a TODO and a bug to implement the battery
logic.
BRANCH=None
BUG=None
TEST=./twister
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I44e19e2dd04e66d2da94d563501bc968738b0471
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3906617
Commit-Queue: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | common/vboot/efs2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/vboot/efs2.c b/common/vboot/efs2.c index 885b7595c6..7cb8608daf 100644 --- a/common/vboot/efs2.c +++ b/common/vboot/efs2.c @@ -29,6 +29,9 @@ #define CPRINTS(format, args...) cprints(CC_VBOOT, "VB " format, ##args) #define CPRINTF(format, args...) cprintf(CC_VBOOT, "VB " format, ##args) +/* LCOV_EXCL_START - TODO(b/172210316) implement is_battery_ready(), and remove + * this lcov excl. + */ static const char *boot_mode_to_string(uint8_t mode) { static const char *boot_mode_str[] = { @@ -39,6 +42,7 @@ static const char *boot_mode_to_string(uint8_t mode) return boot_mode_str[mode]; return "UNDEF"; } +/* LCOV_EXCL_STOP */ /* * Check whether the session has successfully ended or not. ERR_TIMEOUT is @@ -191,6 +195,9 @@ static enum cr50_comm_err verify_hash(void) return cmd_to_cr50(CR50_COMM_CMD_VERIFY_HASH, hash, SHA256_DIGEST_SIZE); } +/* LCOV_EXCL_START - TODO(b/172210316) implement is_battery_ready(), and remove + * this lcov excl. + */ static enum cr50_comm_err set_boot_mode(uint8_t mode) { enum cr50_comm_err rv; @@ -202,6 +209,7 @@ static enum cr50_comm_err set_boot_mode(uint8_t mode) CPRINTS("Failed to set boot mode"); return rv; } +/* LCOV_EXCL_STOP */ static bool pd_comm_enabled; |