Convert MemTxResult defines into an enum. This will allow bindgen to generate a bitflag using the enum variants as its domain of values.
Signed-off-by: Manos Pitsidianakis <[email protected]> --- include/exec/memattrs.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index 8db1d3046479c21a32928086ea8804a66a5d5ffa..dc99b456edb0d99eced6f6513c4e1c8013e84c3e 100644 --- a/include/exec/memattrs.h +++ b/include/exec/memattrs.h @@ -81,10 +81,11 @@ QEMU_BUILD_BUG_ON(sizeof(MemTxAttrs) > 8); * of some kind. The memory subsystem will bitwise-OR together results * if it is synthesizing an operation from multiple smaller accesses. */ -#define MEMTX_OK 0 -#define MEMTX_ERROR (1U << 0) /* device returned an error */ -#define MEMTX_DECODE_ERROR (1U << 1) /* nothing at that address */ -#define MEMTX_ACCESS_ERROR (1U << 2) /* access denied */ -typedef uint32_t MemTxResult; +typedef enum MemTxResult { + MEMTX_OK = 0, + MEMTX_ERROR = (1U << 0), /* device returned an error */ + MEMTX_DECODE_ERROR = (1U << 1), /* nothing at that address */ + MEMTX_ACCESS_ERROR = (1U << 2), /* access denied */ +} MemTxResult; #endif -- 2.47.2
