qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vhost: simplify vhost_dev_init() fail_busyloop label


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] vhost: simplify vhost_dev_init() fail_busyloop label
Date: Tue, 23 Feb 2021 12:15:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

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>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]