qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 12/16] pci-assign: propagate errors from assigne


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 12/16] pci-assign: propagate errors from assigned_dev_register_msix_mmio()
Date: Tue, 29 Apr 2014 13:22:45 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/10/2014 02:24 AM, Laszlo Ersek wrote:
> The return type is also changed from "int" to "void", because it was used
> in a success vs. failure sense only (the caller didn't distinguish error
> codes from each other, and even assigned_dev_register_msix_mmio() masked
> mmap()'s errno values with a common -EFAULT).
> 
> Signed-off-by: Laszlo Ersek <address@hidden>
> ---
>  hw/i386/kvm/pci-assign.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 

>      dev->msix_table = mmap(NULL, MSIX_PAGE_SIZE, PROT_READ|PROT_WRITE,
>                             MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
>      if (dev->msix_table == MAP_FAILED) {
> -        error_report("fail allocate msix_table! %s", strerror(errno));
> -        return -EFAULT;
> +        error_setg_errno(errp, errno, "failed to allocate msix_table");

Nice cleanup of the grammar while in the process.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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