]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/core: Move compat_props_add() to 'hw/core/boards.h'
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 25 Mar 2026 14:43:15 +0000 (15:43 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 24 Apr 2026 19:27:21 +0000 (21:27 +0200)
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>

include/hw/core/boards.h
include/hw/core/qdev.h

index 9d4ccd1c1cb20bc3d5acfd3a819412a41b71d0f0..89388530fdbffdb4821aa17e97f4d9d5ca388a33 100644 (file)
@@ -803,6 +803,16 @@ struct MachineState {
         } \
     } while (0)
 
+static inline void
+compat_props_add(GPtrArray *arr,
+                 GlobalProperty props[], size_t nelem)
+{
+    int i;
+    for (i = 0; i < nelem; i++) {
+        g_ptr_array_add(arr, (void *)&props[i]);
+    }
+}
+
 extern GlobalProperty hw_compat_11_0[];
 extern const size_t hw_compat_11_0_len;
 
index f99a8979ccb1903bf9e4b973a0e69600eae807a8..778617787c716df66890ec5b4d900ff76727087d 100644 (file)
@@ -421,16 +421,6 @@ typedef struct GlobalProperty {
     bool optional;
 } GlobalProperty;
 
-static inline void
-compat_props_add(GPtrArray *arr,
-                 GlobalProperty props[], size_t nelem)
-{
-    int i;
-    for (i = 0; i < nelem; i++) {
-        g_ptr_array_add(arr, (void *)&props[i]);
-    }
-}
-
 /*** Board API.  This should go away once we have a machine config file.  ***/
 
 /**