[Qemu-devel] [PATCH v9 4/7] monitor: fix comment for monitor_lock

Peter Xu posted 7 patches 7 years, 5 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v9 4/7] monitor: fix comment for monitor_lock
Posted by Peter Xu 7 years, 5 months ago
Fix typo in d622cb5879c.  Meanwhile move these variables close to each
other.  monitor_qapi_event_state can be declared static, add that.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 monitor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/monitor.c b/monitor.c
index f23178951e..2504696d76 100644
--- a/monitor.c
+++ b/monitor.c
@@ -267,10 +267,11 @@ typedef struct QMPRequest QMPRequest;
 /* QMP checker flags */
 #define QMP_ACCEPT_UNKNOWNS 1
 
-/* Protects mon_list, monitor_event_state.  */
+/* Protects mon_list, monitor_qapi_event_state.  */
 static QemuMutex monitor_lock;
-
+static GHashTable *monitor_qapi_event_state;
 static QTAILQ_HEAD(mon_list, Monitor) mon_list;
+
 static QLIST_HEAD(mon_fdsets, MonFdset) mon_fdsets;
 static int mon_refcount;
 
@@ -572,8 +573,6 @@ static MonitorQAPIEventConf monitor_qapi_event_conf[QAPI_EVENT__MAX] = {
     [QAPI_EVENT_VSERPORT_CHANGE]   = { 1000 * SCALE_MS },
 };
 
-GHashTable *monitor_qapi_event_state;
-
 /*
  * Emits the event to every monitor instance, @event is only used for trace
  * Called with monitor_lock held.
-- 
2.17.0


Re: [Qemu-devel] [PATCH v9 4/7] monitor: fix comment for monitor_lock
Posted by Stefan Hajnoczi 7 years, 5 months ago
On Tue, May 29, 2018 at 01:57:52PM +0800, Peter Xu wrote:
> Fix typo in d622cb5879c.  Meanwhile move these variables close to each
> other.  monitor_qapi_event_state can be declared static, add that.
> 
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  monitor.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [Qemu-devel] [PATCH v9 4/7] monitor: fix comment for monitor_lock
Posted by Markus Armbruster 7 years, 4 months ago
Peter Xu <peterx@redhat.com> writes:

> Fix typo in d622cb5879c.  Meanwhile move these variables close to each
> other.  monitor_qapi_event_state can be declared static, add that.
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>