From: Paolo Bonzini <pbonzini@redhat.com>
To: linmiaohe <linmiaohe@huawei.com>, rkrcmar@redhat.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: MMIO: get rid of odd out_err label in kvm_coalesced_mmio_init
Date: Mon, 11 Nov 2019 15:07:25 +0100 [thread overview]
Message-ID: <e6780f84-e5e5-09ec-3cef-535a2d33ef92@redhat.com> (raw)
In-Reply-To: <1573286900-19041-1-git-send-email-linmiaohe@huawei.com>
On 09/11/19 09:08, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
>
> The out_err label and var ret is unnecessary, clean them up.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> virt/kvm/coalesced_mmio.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
> index 8ffd07e2a160..00c747dbc82e 100644
> --- a/virt/kvm/coalesced_mmio.c
> +++ b/virt/kvm/coalesced_mmio.c
> @@ -110,14 +110,11 @@ static const struct kvm_io_device_ops coalesced_mmio_ops = {
> int kvm_coalesced_mmio_init(struct kvm *kvm)
> {
> struct page *page;
> - int ret;
>
> - ret = -ENOMEM;
> page = alloc_page(GFP_KERNEL | __GFP_ZERO);
> if (!page)
> - goto out_err;
> + return -ENOMEM;
>
> - ret = 0;
> kvm->coalesced_mmio_ring = page_address(page);
>
> /*
> @@ -128,8 +125,7 @@ int kvm_coalesced_mmio_init(struct kvm *kvm)
> spin_lock_init(&kvm->ring_lock);
> INIT_LIST_HEAD(&kvm->coalesced_zones);
>
> -out_err:
> - return ret;
> + return 0;
> }
>
> void kvm_coalesced_mmio_free(struct kvm *kvm)
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2019-11-11 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-09 8:08 [PATCH] KVM: MMIO: get rid of odd out_err label in kvm_coalesced_mmio_init linmiaohe
2019-11-11 14:07 ` Paolo Bonzini [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=e6780f84-e5e5-09ec-3cef-535a2d33ef92@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@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