Tom Hughes has uploaded this change for review.
flash: move nested struct to top level
The nested "struct tested" struct is "struct flashchip::tested" in C++.
Move "struct tested" to the top level namespace to avoid this
difference when using the "TEST_" macros that cast to "struct tested".
BUG=b:144959033
TEST=emerge-hatch flashrom
Change-Id: I89988e4a6a7ca65866ba019320e480e491389d56
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
---
M flash.h
1 file changed, 9 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/99/62999/1
diff --git a/flash.h b/flash.h
index f63aa5d..738bb73 100644
--- a/flash.h
+++ b/flash.h
@@ -154,6 +154,14 @@
NA, /* Not applicable (e.g. write support on ROM chips) */
};
+/* Indicate how well flashrom supports different operations of this flash chip. */
+struct tested {
+ enum test_state probe;
+ enum test_state read;
+ enum test_state erase;
+ enum test_state write;
+};
+
#define TEST_UNTESTED (struct tested){ .probe = NT, .read = NT, .erase = NT, .write = NT }
#define TEST_OK_PROBE (struct tested){ .probe = OK, .read = NT, .erase = NT, .write = NT }
@@ -218,12 +226,7 @@
int feature_bits;
/* Indicate how well flashrom supports different operations of this flash chip. */
- struct tested {
- enum test_state probe;
- enum test_state read;
- enum test_state erase;
- enum test_state write;
- } tested;
+ struct tested tested;
/*
* Group chips that have common command sets. This should ensure that
To view, visit change 62999. To unsubscribe, or for help writing mail filters, visit settings.