All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: 朱光宏 <zhuguanghong@uniontech.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	QEMU <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it.
Date: Thu, 22 Jul 2021 10:19:35 +0100	[thread overview]
Message-ID: <YPk4J/pQzGajG3NZ@redhat.com> (raw)
In-Reply-To: <tencent_45F13726486174B635D9CD6A@qq.com>

On Thu, Jul 22, 2021 at 05:15:46PM +0800, 朱光宏 wrote:
> &nbsp;Hi
> Signed-off-by: zhuguanghong <zhuguanghong@uniontech.com&gt;
> ---
> &nbsp;qom/object.c | 4 ++++
> &nbsp;1 file changed, 4 insertions(+)
> 
> 
> diff --git a/qom/object.c b/qom/object.c
> index 6a01d56546..dc0a363ed0 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -73,15 +73,19 @@ struct TypeImpl
> &nbsp;};
> 
> 
> &nbsp;static Type type_interface;
> +G_LOCK_DEFINE (GHashTable_mutex);
> 
> 
> &nbsp;static GHashTable *type_table_get(void)
> &nbsp;{
> &nbsp; &nbsp; &nbsp;static GHashTable *type_table;
> +&nbsp; &nbsp; G_LOCK ( GHashTable_mutex);&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
> 
> 
> &nbsp; &nbsp; &nbsp;if (type_table == NULL) {
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;type_table = g_hash_table_new(g_str_hash, g_str_equal);
> &nbsp; &nbsp; &nbsp;}
> 
> 
> +&nbsp; &nbsp; G_UNLOCK ( GHashTable_mutex);&nbsp; &nbsp; &nbsp;&nbsp;
> +
> &nbsp; &nbsp; &nbsp;return type_table;
> &nbsp;}

Please could you check your mail client settings so that it correctly
sends *plain* text messages.  This is a multipart text/plain+text/html
message, but the text/plain part is full of HTML entities. This makes
your messages almost impossible to read and reply to.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



      reply	other threads:[~2021-07-22  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21  8:44 [PATCH] qom/object.c 'if (type_table == NULL)' statement is redundant , delete it zhuguanghong
2021-07-21 13:55 ` Marc-André Lureau
2021-07-21 13:59   ` Daniel P. Berrangé
2021-07-22  9:15     ` [PATCH v2] " 朱光宏
2021-07-22  9:19       ` Daniel P. Berrangé [this message]

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=YPk4J/pQzGajG3NZ@redhat.com \
    --to=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhuguanghong@uniontech.com \
    /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.