]> git.ipfire.org Git - thirdparty/qemu.git/commit
include/hw/qdev-core: Detect most empty Property lists at compile time
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 18 Dec 2024 13:42:39 +0000 (07:42 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Dec 2024 18:33:37 +0000 (19:33 +0100)
commit588611972f774cacf2e15c73e3d61b54929c0528
tree510efbc5908a87608df9a52973886bd2f5c18f84
parent2885bf891ac2630f6847829e02b984e4a828309b
include/hw/qdev-core: Detect most empty Property lists at compile time

Add a macro expansion of device_class_set_props which can check
on the type and size of PROPS before calling the function.

Avoid the macro in migration.c because migration_properties
is defined externally with indeterminate size.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Lei Yang <leiyang@redhat.com>
Link: https://lore.kernel.org/r/20241218134251.4724-13-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/qdev-properties.c
include/hw/qdev-core.h
migration/migration.c