diff mbox series

[v2,03/14] plugins: Uninline qemu_plugin_add_opts

Message ID 20250203031821.741477-4-richard.henderson@linaro.org (mailing list archive)
State New
Headers show
Series meson: Deprecate 32-bit host support | expand

Commit Message

Richard Henderson Feb. 3, 2025, 3:18 a.m. UTC
No need to expand this function inline.
Unexport qemu_plugin_opts to match.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/qemu/plugin.h | 9 +--------
 plugins/loader.c      | 7 ++++++-
 2 files changed, 7 insertions(+), 9 deletions(-)

Comments

Thomas Huth Feb. 3, 2025, 10:02 a.m. UTC | #1
On 03/02/2025 04.18, Richard Henderson wrote:
> No need to expand this function inline.
> Unexport qemu_plugin_opts to match.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   include/qemu/plugin.h | 9 +--------
>   plugins/loader.c      | 7 ++++++-
>   2 files changed, 7 insertions(+), 9 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>
Alex Bennée Feb. 3, 2025, 11:44 a.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> No need to expand this function inline.
> Unexport qemu_plugin_opts to match.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
diff mbox series

Patch

diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index 9726a9ebf3..3efded6a3e 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -11,7 +11,6 @@ 
 #include "qemu/qemu-plugin.h"
 #include "qemu/error-report.h"
 #include "qemu/queue.h"
-#include "qemu/option.h"
 #include "qemu/plugin-event.h"
 #include "qemu/bitmap.h"
 #include "exec/memopidx.h"
@@ -44,13 +43,7 @@  get_plugin_meminfo_rw(qemu_plugin_meminfo_t i)
 }
 
 #ifdef CONFIG_PLUGIN
-extern QemuOptsList qemu_plugin_opts;
-
-static inline void qemu_plugin_add_opts(void)
-{
-    qemu_add_opts(&qemu_plugin_opts);
-}
-
+void qemu_plugin_add_opts(void);
 void qemu_plugin_opt_parse(const char *optstr, QemuPluginList *head);
 int qemu_plugin_load_list(QemuPluginList *head, Error **errp);
 
diff --git a/plugins/loader.c b/plugins/loader.c
index ebc01da9c6..35680bfc13 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -55,7 +55,7 @@  struct qemu_plugin_parse_arg {
     struct qemu_plugin_desc *curr;
 };
 
-QemuOptsList qemu_plugin_opts = {
+static QemuOptsList qemu_plugin_opts = {
     .name = "plugin",
     .implied_opt_name = "file",
     .head = QTAILQ_HEAD_INITIALIZER(qemu_plugin_opts.head),
@@ -65,6 +65,11 @@  QemuOptsList qemu_plugin_opts = {
     },
 };
 
+void qemu_plugin_add_opts(void)
+{
+    qemu_add_opts(&qemu_plugin_opts);
+}
+
 typedef int (*qemu_plugin_install_func_t)(qemu_plugin_id_t, const qemu_info_t *, int, char **);
 
 extern struct qemu_plugin_state plugin;