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>
This commit is contained in:
Philippe Mathieu-Daudé
2026-03-25 15:43:15 +01:00
parent 1bfa19a3fd
commit c459df2fc2
2 changed files with 10 additions and 10 deletions

View 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;

View 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. ***/
/**