diff options
author | Keith Short <keithshort@chromium.org> | 2021-04-08 13:39:28 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-09 05:25:40 +0000 |
commit | 62d4342002e79b6b778b74c1d3381a9500b995f9 (patch) | |
tree | d05e29009776148a09fc5e3ae182f9f29ad4981e /zephyr/test/system/test_system.c | |
parent | a708619bfd3162e56c9776a5c880994980316bed (diff) | |
download | chrome-ec-62d4342002e79b6b778b74c1d3381a9500b995f9.tar.gz |
zephyr: Fix duplicated definition warning
Fix a duplicated definition warning in zephyr/test/system.
BUG=none
BRANCH=none
TEST=zmake testall
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ic18dbbd7a9523484c6c46552d807424dcf227d33
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816142
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/test/system/test_system.c')
-rw-r--r-- | zephyr/test/system/test_system.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/zephyr/test/system/test_system.c b/zephyr/test/system/test_system.c index 7a78e2ae82..bb4f245644 100644 --- a/zephyr/test/system/test_system.c +++ b/zephyr/test/system/test_system.c @@ -13,8 +13,10 @@ LOG_MODULE_REGISTER(test); -#define BBRAM_OFF(name) DT_PROP(DT_PATH(named_bbram_regions, name), offset) -#define BBRAM_SIZE(name) DT_PROP(DT_PATH(named_bbram_regions, name), size) +#define BBRAM_REGION_OFF(name) \ + DT_PROP(DT_PATH(named_bbram_regions, name), offset) +#define BBRAM_REGION_SIZE(name) \ + DT_PROP(DT_PATH(named_bbram_regions, name), size) static char mock_data[64] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@"; @@ -55,23 +57,23 @@ static void test_bbram_get(void) rc = system_get_bbram(SYSTEM_BBRAM_IDX_PD0, output); zassert_equal(rc, 0, NULL); - zassert_mem_equal(output, mock_data + BBRAM_OFF(pd0), BBRAM_SIZE(pd0), - NULL); + zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(pd0), + BBRAM_REGION_SIZE(pd0), NULL); rc = system_get_bbram(SYSTEM_BBRAM_IDX_PD1, output); zassert_equal(rc, 0, NULL); - zassert_mem_equal(output, mock_data + BBRAM_OFF(pd1), BBRAM_SIZE(pd1), - NULL); + zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(pd1), + BBRAM_REGION_SIZE(pd1), NULL); rc = system_get_bbram(SYSTEM_BBRAM_IDX_PD2, output); zassert_equal(rc, 0, NULL); - zassert_mem_equal(output, mock_data + BBRAM_OFF(pd2), BBRAM_SIZE(pd2), - NULL); + zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(pd2), + BBRAM_REGION_SIZE(pd2), NULL); rc = system_get_bbram(SYSTEM_BBRAM_IDX_TRY_SLOT, output); zassert_equal(rc, 0, NULL); - zassert_mem_equal(output, mock_data + BBRAM_OFF(try_slot), - BBRAM_SIZE(try_slot), NULL); + zassert_mem_equal(output, mock_data + BBRAM_REGION_OFF(try_slot), + BBRAM_REGION_SIZE(try_slot), NULL); } void test_main(void) |