On 8/15/23 17:44, Richard Henderson wrote:
On 8/15/23 13:15, Daniel Henrique Barboza wrote:@@ -1883,6 +1883,13 @@ static void cpu_set_cfg_unavailable(Object *obj, Visitor *v, } #endif +#define ADD_CPU_QDEV_PROPERTIES_ARRAY(_dev, _array) \ + do { \ + for (Property *prop = _array; prop && prop->name; prop++) { \ + qdev_property_add_static(_dev, prop); \ + } \ + } while (0)Any reason not to make this a proper function?
It was a macro since early versions and remained this way. I don't have strong feelings in favor or against it. I assume that you don't fancy this macro usage, and probably for a good reason, so I guess I'll do another version without macros in this patch and patch 8 (since it's a similar macro usage). Thanks, Daniel
r~
