diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-10-06 13:10:56 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-07 21:37:33 +0000 |
commit | 4f6d8ca42115d3c39cbc6a476414df0be629f51e (patch) | |
tree | d1dac4da26ff4ba3dbe6450a48f2c7d8337acb44 /include/chipset.h | |
parent | 08c3a7dbd3592e5fdcf73d314b98d990d0f0a075 (diff) | |
download | chrome-ec-4f6d8ca42115d3c39cbc6a476414df0be629f51e.tar.gz |
ec: Don't declare forward decls as weak
If a function in a header is marked as weak (test_mockable), that tells
the linker that it is ok for the symbol to be missing. We never want
that.
If a function implementation is marked as weak, that tells the linker it
is ok to use a non-weak symbol instead of this one. This is what we want
when we are trying to override functions.
Remove all test_mockables from headers, except for one inline function
that I wasn't sure what to do with.
BRANCH=None
BUG=None
TEST=make -j$(nproc) runhosttests buildall && zmake build -a && \
./twister -v -i --clobber
LOW_COVERAGE_REASON=Added stub get_ap_reset_stats() for tests that
don't care about that function, and it's always unused.
Change-Id: Ic00a897131c93ef134544f26a8e368ce1f78a5de
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935720
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'include/chipset.h')
-rw-r--r-- | include/chipset.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/chipset.h b/include/chipset.h index 1a5c5a0d2f..a3b3a94206 100644 --- a/include/chipset.h +++ b/include/chipset.h @@ -258,7 +258,7 @@ void report_ap_reset(enum chipset_shutdown_reason reason); * @param num_reset_log_entries Number of items in reset_log_entries. * @param resets_since_ec_boot Number of AP resets since EC boot. */ -test_mockable enum ec_error_list +enum ec_error_list get_ap_reset_stats(struct ap_reset_log_entry *reset_log_entries, size_t num_reset_log_entries, uint32_t *resets_since_ec_boot); |