hw/core: Move compat_props_add() to 'hw/core/boards.h'
compat_props_add() is only used by board models, no need to expose it to any device model. Restrict by defining it only in "hw/core/boards.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Message-Id: <20260325151728.45378-3-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Mar 25, 2026 at 15:43 UTC
c459df2fc2dd831d43a456e8505e156bbf7cf656
2 files changed
+10
-10
include/hw/core/boards.h
+10
@@ -803,6 +803,16 @@ struct MachineState {
803
} \
804
} while (0)
805
806
+static inline void
807
+compat_props_add(GPtrArray *arr,
808
+ GlobalProperty props[], size_t nelem)
809
+{
810
+ int i;
811
+ for (i = 0; i < nelem; i++) {
812
+ g_ptr_array_add(arr, (void *)&props[i]);
813
+ }
814
+}
815
+
816
extern GlobalProperty hw_compat_11_0[];
817
extern const size_t hw_compat_11_0_len;
818
include/hw/core/qdev.h
-10
@@ -421,16 +421,6 @@ typedef struct GlobalProperty {
421
bool optional;
422
} GlobalProperty;
423
424
-static inline void
425
-compat_props_add(GPtrArray *arr,
426
- GlobalProperty props[], size_t nelem)
427
-{
428
- int i;
429
- for (i = 0; i < nelem; i++) {
430
- g_ptr_array_add(arr, (void *)&props[i]);
431
- }
432
-}
433
-
424
/*** Board API. This should go away once we have a machine config file. ***/
425
426
/**