All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dave@treblig.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: [PATCH v3 19/23] monitor: Better express monitor_read()'s opaque arg is of Monitor type
Date: Wed, 12 Aug 2026 23:17:03 +0200	[thread overview]
Message-ID: <20260812211708.92824-20-philmd@oss.qualcomm.com> (raw)
In-Reply-To: <20260812211708.92824-1-philmd@oss.qualcomm.com>

monitor_read() is a IOReadHandler handler, called by
qemu_chr_fe_set_handlers() with a Monitor* opaque argument.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
 monitor/hmp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/monitor/hmp.c b/monitor/hmp.c
index 24076dc7c03..bfe3cea902c 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -1519,7 +1519,8 @@ cleanup:
 
 static void monitor_read(void *opaque, const uint8_t *buf, int size)
 {
-    MonitorHMP *hmon = container_of(opaque, MonitorHMP, parent_obj);
+    Monitor *mon = opaque;
+    MonitorHMP *hmon = container_of(mon, MonitorHMP, parent_obj);
     int i;
 
     if (hmon->rs) {
-- 
2.53.0



  parent reply	other threads:[~2026-08-12 21:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 21:16 [PATCH v3 00/23] monitor: Reduce headers included in 'monitor/monitor.h' Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 01/23] hexagon: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 02/23] net/vhost-vdpa: Include missing 'qemu/iov.h' header Philippe Mathieu-Daudé
2026-08-12 21:28   ` Michael S. Tsirkin
2026-08-13  6:22   ` marcandre.lureau
2026-08-12 21:16 ` [PATCH v3 03/23] tests/unit: Include 'qemu/main-loop.h' header in test-util-sockets.c Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 04/23] qapi/qmp-dispatch: Include 'qemu/aio-wait.h' and 'monitor/monitor.h' Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 05/23] qapi/qmp-registry: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 06/23] migration/hmp-cmds: Include 'block/block-global-state.h' header Philippe Mathieu-Daudé
2026-08-12 23:26   ` Dr. David Alan Gilbert
2026-08-12 21:16 ` [PATCH v3 07/23] monitor: Include missing 'qemu/aio-wait.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 08/23] monitor: Include missing 'qemu/lockable.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 09/23] monitor: Include missing 'qemu/coroutine-core.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 10/23] monitor: Reduce inclusion of 'qapi/qapi-emit-events.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 11/23] monitor: Remove unnecessary 'block/block.h' header Philippe Mathieu-Daudé
2026-08-13  6:22   ` marcandre.lureau
2026-08-12 21:16 ` [PATCH v3 12/23] system: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 13/23] system/dirtylimit: Extract HMP code to dirtylimit-hmp-cmds.c Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 14/23] system: Move qmp_inject_nmi() to hw/core/machine-qmp-cmds.c Philippe Mathieu-Daudé
2026-08-12 21:16 ` [PATCH v3 15/23] system: Extract QMP memsave/pmemsave commands to physmem-qmp-cmds.c Philippe Mathieu-Daudé
2026-08-12 21:17 ` [PATCH v3 16/23] system: Move runstate-related code from cpus.c to runstate.c Philippe Mathieu-Daudé
2026-08-12 21:17 ` [PATCH v3 17/23] monitor: Rename MonitorQMP @mon -> @qmon Philippe Mathieu-Daudé
2026-08-13  6:22   ` marcandre.lureau
2026-08-13  8:24     ` Philippe Mathieu-Daudé
2026-08-13  9:16       ` Marc-André Lureau
2026-08-13  9:26   ` Daniel P. Berrangé
2026-08-13  9:36     ` Philippe Mathieu-Daudé
2026-08-12 21:17 ` [PATCH v3 18/23] monitor: Rename MonitorHMP @mon -> @hmon Philippe Mathieu-Daudé
2026-08-12 21:17 ` Philippe Mathieu-Daudé [this message]
2026-08-13  9:19   ` [PATCH v3 19/23] monitor: Better express monitor_read()'s opaque arg is of Monitor type marcandre.lureau
2026-08-12 21:17 ` [PATCH v3 20/23] monitor: Use QOM MONITOR() macro to access MonitorQMP->parent_obj Philippe Mathieu-Daudé
2026-08-12 21:17 ` [PATCH v3 21/23] monitor: Use QOM MONITOR() macro to access MonitorHMP->parent_obj Philippe Mathieu-Daudé
2026-08-12 21:17 ` [PATCH v3 22/23] monitor: Replace container_of(MonitorHMP, parent_obj) -> MONITOR_HMP() Philippe Mathieu-Daudé
2026-08-13  9:19   ` marcandre.lureau
2026-08-12 21:17 ` [PATCH v3 23/23] monitor/hmp: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé

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=20260812211708.92824-20-philmd@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.