All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: "Emilio G . Cota" <cota@braap.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL v2 11/13] qemu/plugin: Move !CONFIG_PLUGIN stubs altogether
Date: Fri, 15 May 2020 15:44:03 +0100	[thread overview]
Message-ID: <20200515144405.20580-12-alex.bennee@linaro.org> (raw)
In-Reply-To: <20200515144405.20580-1-alex.bennee@linaro.org>

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Simplify the ifdef'ry by moving all stubs together.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200510171119.20827-3-f4bug@amsat.org>
Message-Id: <20200513173200.11830-3-alex.bennee@linaro.org>

diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index e45f950fe36..ab790ad105c 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -46,22 +46,6 @@ static inline void qemu_plugin_add_opts(void)
 
 void qemu_plugin_opt_parse(const char *optarg, QemuPluginList *head);
 int qemu_plugin_load_list(QemuPluginList *head);
-#else /* !CONFIG_PLUGIN */
-static inline void qemu_plugin_add_opts(void)
-{ }
-
-static inline void qemu_plugin_opt_parse(const char *optarg,
-                                         QemuPluginList *head)
-{
-    error_report("plugin interface not enabled in this build");
-    exit(1);
-}
-
-static inline int qemu_plugin_load_list(QemuPluginList *head)
-{
-    return 0;
-}
-#endif /* !CONFIG_PLUGIN */
 
 union qemu_plugin_cb_sig {
     qemu_plugin_simple_cb_t          simple;
@@ -182,8 +166,6 @@ struct qemu_plugin_insn *qemu_plugin_tb_insn_get(struct qemu_plugin_tb *tb)
     return insn;
 }
 
-#ifdef CONFIG_PLUGIN
-
 void qemu_plugin_vcpu_init_hook(CPUState *cpu);
 void qemu_plugin_vcpu_exit_hook(CPUState *cpu);
 void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu_plugin_tb *tb);
@@ -207,6 +189,21 @@ void qemu_plugin_disable_mem_helpers(CPUState *cpu);
 
 #else /* !CONFIG_PLUGIN */
 
+static inline void qemu_plugin_add_opts(void)
+{ }
+
+static inline void qemu_plugin_opt_parse(const char *optarg,
+                                         QemuPluginList *head)
+{
+    error_report("plugin interface not enabled in this build");
+    exit(1);
+}
+
+static inline int qemu_plugin_load_list(QemuPluginList *head)
+{
+    return 0;
+}
+
 static inline void qemu_plugin_vcpu_init_hook(CPUState *cpu)
 { }
 
-- 
2.20.1



  parent reply	other threads:[~2020-05-15 14:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 14:43 [PULL v2 00/13] testing, tcg and plugin updates Alex Bennée
2020-05-15 14:43 ` [PULL v2 01/13] tests/guest-debug: catch hanging guests Alex Bennée
2020-05-15 14:43 ` [PULL v2 02/13] travis.yml: Improve the --disable-tcg test on s390x Alex Bennée
2020-05-15 14:43 ` [PULL v2 03/13] linux-user: completely re-write init_guest_space Alex Bennée
2020-05-15 14:43 ` [PULL v2 04/13] exec/cpu-all: Use bool for have_guest_base Alex Bennée
2020-05-15 14:43 ` [PULL v2 05/13] accel/tcg: Relax va restrictions on 64-bit guests Alex Bennée
2020-06-04 14:15   ` Laurent Vivier
2020-06-04 17:31     ` Alex Bennée
2020-06-05 14:11       ` Alex Bennée
2020-06-05 17:38         ` Richard Henderson
2020-06-05 17:46           ` Alex Bennée
2020-06-05 18:26             ` Richard Henderson
2020-05-15 14:43 ` [PULL v2 06/13] accel/tcg: don't disable exec_tb trace events Alex Bennée
2020-05-15 14:43 ` [PULL v2 07/13] disas: include an optional note for the start of disassembly Alex Bennée
2020-05-15 14:44 ` [PULL v2 08/13] disas: add optional note support to cap_disas Alex Bennée
2020-05-15 14:44 ` [PULL v2 09/13] translate-all: include guest address in out_asm output Alex Bennée
2020-05-15 14:44 ` [PULL v2 10/13] qemu/plugin: Trivial code movement Alex Bennée
2020-05-15 14:44 ` Alex Bennée [this message]
2020-05-15 14:44 ` [PULL v2 12/13] qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument const Alex Bennée
2020-05-15 14:44 ` [PULL v2 13/13] MAINTAINERS: update the orphaned cpus-common.c file Alex Bennée
2020-05-15 15:46 ` [PULL v2 00/13] testing, tcg and plugin updates Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200515144405.20580-12-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.