summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-08-30 11:11:13 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2022-10-28 00:41:32 +0000
commit2e00f736714c3117354106c502a8c89b23896b2b (patch)
treefa51e602529c445891de23cafb36a1f4f42b6434 /tests
parentbd8a02de6cd9a6fb909be7e246ab7bb0dc558798 (diff)
downloadflashrom-2e00f736714c3117354106c502a8c89b23896b2b.tar.gz
flashrom-2e00f736714c3117354106c502a8c89b23896b2b.tar.bz2
flashrom-2e00f736714c3117354106c502a8c89b23896b2b.zip
tree/: Convert flashchip decode range func ptr to enum
Replace the `decode_range` function pointer in `struct flashchip` to an enum value. The enum value can be used to find the corresponding function pointer by passing it to `lookup_decode_range_func_ptr()`. Removing function pointers like `decode_range` makes it possible to represent chip data in a declarative format that does not have to be stored as C source code. BUG=b:242479049 BRANCH=none TEST=ninja && ninja test Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Change-Id: If6d08d414d3d1ddadc95ca1d407fc87c23ab543d Reviewed-on: https://review.coreboot.org/c/flashrom/+/67195 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/chip_wp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/chip_wp.c b/tests/chip_wp.c
index 95e6b05ce..e4eff9907 100644
--- a/tests/chip_wp.c
+++ b/tests/chip_wp.c
@@ -97,7 +97,7 @@ static const struct flashchip chip_W25Q128_V = {
.cmp = {STATUS2, 6, RW},
.wps = {STATUS3, 2, RW},
},
- .decode_range = decode_range_spi25,
+ .decode_range = DECODE_RANGE_SPI25,
};
/* Trying to set an unsupported WP range fails */