From: "Alex Bennée" <alex.bennee@linaro.org>
To: nyoro.gachu@gmail.com
Cc: stefanha@redhat.com, samkergachu@gmail.com,
Samker <nyoro.martin@gmail.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] LOCK GUARDS: replace manual lock()/unlock() calls to QEMU_LOCK_GUARD()
Date: Tue, 08 Nov 2022 09:19:51 +0000 [thread overview]
Message-ID: <87bkphg5tv.fsf@linaro.org> (raw)
In-Reply-To: <20221108051120.6859-1-nyoro.martin@gmail.com>
nyoro.gachu@gmail.com writes:
> From: Samker <nyoro.martin@gmail.com>
>
> This is patch replaces WITH_QEMU_LOCK_GUARD() call with the
> QEMU_LOCK_GUARD()
You could extend this description as to why ".. because it extends the
scope of the lock to the whole function rather than the non-existent
block".
Otherwise:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>
> Signed-off-by: Samker <nyoro.martin@gmail.com>
> ---
> softmmu/physmem.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index fb00596777..907491ae17 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -3115,7 +3115,7 @@ void cpu_register_map_client(QEMUBH *bh)
> {
> MapClient *client = g_malloc(sizeof(*client));
>
> - WITH_QEMU_LOCK_GUARD(&map_client_list_lock);
> + QEMU_LOCK_GUARD(&map_client_list_lock);
> client->bh = bh;
> QLIST_INSERT_HEAD(&map_client_list, client, link);
> if (!qatomic_read(&bounce.in_use)) {
> @@ -3143,7 +3143,7 @@ void cpu_unregister_map_client(QEMUBH *bh)
> {
> MapClient *client;
>
> - WITH_QEMU_LOCK_GUARD(&map_client_list_lock);
> + QEMU_LOCK_GUARD(&map_client_list_lock);
> QLIST_FOREACH(client, &map_client_list, link) {
> if (client->bh == bh) {
> cpu_unregister_map_client_do(client);
--
Alex Bennée
prev parent reply other threads:[~2022-11-08 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 5:11 [PATCH] LOCK GUARDS: replace manual lock()/unlock() calls to QEMU_LOCK_GUARD() nyoro.gachu
2022-11-08 8:05 ` Philippe Mathieu-Daudé
2022-11-08 9:01 ` Martin Gachu
2022-11-08 9:19 ` Alex Bennée [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=87bkphg5tv.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=nyoro.gachu@gmail.com \
--cc=nyoro.martin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=samkergachu@gmail.com \
--cc=stefanha@redhat.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.