diff options
author | Yidi Lin <yidilin@chromium.org> | 2024-11-02 11:10:26 +0800 |
---|---|---|
committer | Yu-Ping Wu <yupingso@google.com> | 2024-11-07 09:38:31 +0000 |
commit | d9b0f5a5779ab040599113601a9971ceb36c399b (patch) | |
tree | 3b62dafab66b1f214d7e667ba34f5ce95f507dfc /src/soc/mediatek/common/include | |
parent | 6efc32b6c610bcbec4125a3219a1e23d3a8a34e1 (diff) |
soc/mediatek/common: Refactor `struct tracker`
Rather than using a static array size for the `offset` variable, use a
pointer named `offsets` that points to a dynamically allocated array. A
separate variable called `offset_size` stores the size of this array.
TEST=emerge-corsola coreboot && emerge-geralt coreboot
Change-Id: I4b89c27fd693ee08e670c1a9ab4cbdbec220bee7
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84958
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/common/include')
-rw-r--r-- | src/soc/mediatek/common/include/soc/tracker_common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/include/soc/tracker_common.h b/src/soc/mediatek/common/include/soc/tracker_common.h index 02694579e1..f1cdb639c9 100644 --- a/src/soc/mediatek/common/include/soc/tracker_common.h +++ b/src/soc/mediatek/common/include/soc/tracker_common.h @@ -16,7 +16,8 @@ struct tracker { uintptr_t base_addr; u32 timeout; u32 entry; - u32 offset[2]; + const u32 *offsets; + u32 offsets_size; const char *str; }; |