From c6d7824f52534ecd3b02172cb9078f03e318cb2b Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Sat, 25 Jun 2016 11:22:12 -0700 Subject: [PATCH] mock tpm: drop unused functions safe_write() and safe_define_space() functions are defined in secdata_mock.c, but not used in mocked TPM mode. The actual functions have been redefined as static recently and their declarations were removed from src/include/antirollback.h, which now causes compilation problems when CONFIG_VBOOT2_MOCK_SECDATA is defined. Dropping the functions from secdata_mock.c solves the problem. BRANCH=none BUG=none TEST=compilation in mock secdata mode does not fail any more. Change-Id: Ia781ce99630d759469d2bded40952ed21830e611 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/356291 Tested-by: Caesar Wang Reviewed-by: Aaron Durbin Reviewed-by: Randall Spangler --- src/vendorcode/google/chromeos/vboot2/secdata_mock.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/vendorcode/google/chromeos/vboot2/secdata_mock.c b/src/vendorcode/google/chromeos/vboot2/secdata_mock.c index 3bd4b17311..03616c1524 100644 --- a/src/vendorcode/google/chromeos/vboot2/secdata_mock.c +++ b/src/vendorcode/google/chromeos/vboot2/secdata_mock.c @@ -21,16 +21,6 @@ uint32_t tpm_clear_and_reenable(void) return TPM_SUCCESS; } -uint32_t safe_write(uint32_t index, const void *data, uint32_t length) -{ - return TPM_SUCCESS; -} - -uint32_t safe_define_space(uint32_t index, uint32_t perm, uint32_t size) -{ - return TPM_SUCCESS; -} - uint32_t antirollback_read_space_firmware(struct vb2_context *ctx) { vb2api_secdata_create(ctx);