From c459df2fc2dd831d43a456e8505e156bbf7cf656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 25 Mar 2026 15:43:15 +0100 Subject: [PATCH] hw/core: Move compat_props_add() to 'hw/core/boards.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Michael Tokarev Message-Id: <20260325151728.45378-3-philmd@linaro.org> --- include/hw/core/boards.h | 10 ++++++++++ include/hw/core/qdev.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h index 9d4ccd1c1c..89388530fd 100644 --- a/include/hw/core/boards.h +++ b/include/hw/core/boards.h @@ -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; diff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h index f99a8979cc..778617787c 100644 --- a/include/hw/core/qdev.h +++ b/include/hw/core/qdev.h @@ -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. ***/ /**