qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures.
Since its argument is a mask of bits, rename it as @arch_bitmask. We have less than 32 target architectures so far, so restrict it to the uint32_t type. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Message-Id: <[email protected]> --- include/system/arch_init.h | 8 +++++++- system/arch_init.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/system/arch_init.h b/include/system/arch_init.h index f2f909d5406..92d50ba8d63 100644 --- a/include/system/arch_init.h +++ b/include/system/arch_init.h @@ -25,6 +25,12 @@ enum { QEMU_ARCH_LOONGARCH = (1 << 23), }; -bool qemu_arch_available(unsigned qemu_arch_mask); +/** + * qemu_arch_available: + * @arch_bitmask: bitmask of QEMU_ARCH_* constants + * + * Return whether the current target architecture is contained in @arch_bitmask + */ +bool qemu_arch_available(uint32_t arch_bitmask); #endif diff --git a/system/arch_init.c b/system/arch_init.c index e85736884c9..ec9e45a1a80 100644 --- a/system/arch_init.c +++ b/system/arch_init.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "system/arch_init.h" -bool qemu_arch_available(unsigned qemu_arch_mask) +bool qemu_arch_available(uint32_t arch_bitmask) { - return qemu_arch_mask & QEMU_ARCH; + return arch_bitmask & QEMU_ARCH; } -- 2.52.0
