qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] vhost: simplify vhost_dev_init() fail_busyloop label
Date: Tue, 23 Feb 2021 12:15:37 +0100	[thread overview]
Message-ID: <fe62c294-c3e1-089e-2fd7-2e872ac33340@redhat.com> (raw)
In-Reply-To: <20210222114931.272308-1-stefanha@redhat.com>

On 2/22/21 12:49 PM, Stefan Hajnoczi wrote:
> Requiring a conditional for every goto is tedious:
> 
>   if (busyloop_timeout) {
>       goto fail_busyloop;
>   } else {
>       goto fail;
>   }
> 
> Move the conditional to into the fail_busyloop label so that it's safe
> to jump to this label unconditionally.
> 
> This change makes the migrate_add_blocker() error case more consistent.
> It jumped to fail_busyloop unconditionally whereas the memslots limits
> error case was conditional.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  hw/virtio/vhost.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



      parent reply	other threads:[~2021-02-23 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 11:49 [PATCH] vhost: simplify vhost_dev_init() fail_busyloop label Stefan Hajnoczi
2021-02-23 10:53 ` Stefano Garzarella
2021-02-23 11:15 ` Philippe Mathieu-Daudé [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=fe62c294-c3e1-089e-2fd7-2e872ac33340@redhat.com \
    --to=philmd@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).