qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Pankaj Gupta <pagupta@redhat.com>, mst@redhat.com
Cc: peter.maydell@linaro.org, cohuck@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] virtio pmem: fix wrong mem region condition
Date: Mon, 15 Jul 2019 08:44:30 +0200	[thread overview]
Message-ID: <bff8da22-a55e-ba7b-16b7-7d1fac3f355e@redhat.com> (raw)
In-Reply-To: <20190712073554.21918-2-pagupta@redhat.com>

On 12.07.19 09:35, Pankaj Gupta wrote:
> Coverity reported memory region returns zero
> for non-null value. This is because of wrong
> arguments to '?:' , fixing this.
> 
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> ---
>  hw/virtio/virtio-pmem-pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
> index 8b2d0dbccc..0da6627469 100644
> --- a/hw/virtio/virtio-pmem-pci.c
> +++ b/hw/virtio/virtio-pmem-pci.c
> @@ -57,7 +57,7 @@ static uint64_t virtio_pmem_pci_get_plugged_size(const MemoryDeviceState *md,
>      MemoryRegion *mr = vpc->get_memory_region(pmem, errp);
>  
>      /* the plugged size corresponds to the region size */
> -    return mr ? 0 : memory_region_size(mr);
> +    return mr ? memory_region_size(mr) : 0;
>  }
>  
>  static void virtio_pmem_pci_fill_device_info(const MemoryDeviceState *md,
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb


  parent reply	other threads:[~2019-07-15  6:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  7:35 [Qemu-devel] [PATCH 0/3] virtio pmem: coverity fixes Pankaj Gupta
2019-07-12  7:35 ` [Qemu-devel] [PATCH 1/3] virtio pmem: fix wrong mem region condition Pankaj Gupta
2019-07-12  8:50   ` Stefano Garzarella
2019-07-12  9:56   ` Cornelia Huck
2019-07-12 15:36   ` [Qemu-devel] [PULL 6/8] " Michael S. Tsirkin
2019-07-12 17:05   ` [Qemu-devel] [PATCH 1/3] " Philippe Mathieu-Daudé
2019-07-15  6:44   ` David Hildenbrand [this message]
2019-07-12  7:35 ` [Qemu-devel] [PATCH 2/3] virtio pmem: remove memdev null check Pankaj Gupta
2019-07-12 10:01   ` Cornelia Huck
2019-07-12 15:36   ` [Qemu-devel] [PULL 7/8] " Michael S. Tsirkin
2019-07-12  7:35 ` [Qemu-devel] [PATCH 3/3] virtio pmem: remove transational device info Pankaj Gupta
2019-07-12 10:03   ` Cornelia Huck
2019-07-12 10:06     ` Pankaj Gupta
2019-07-12 15:36   ` [Qemu-devel] [PULL 8/8] virtio pmem: remove transitional names Michael S. Tsirkin
2019-07-15  6:44   ` [Qemu-devel] [PATCH 3/3] virtio pmem: remove transational device info David Hildenbrand
2019-07-15  7:22     ` Pankaj Gupta
2019-07-15  7:25       ` David Hildenbrand
2019-07-12 10:03 ` [Qemu-devel] [PATCH 0/3] virtio pmem: coverity fixes Cornelia Huck
2019-07-12 10:05   ` Pankaj Gupta
  -- strict thread matches above, loose matches on Subject: below --
2019-07-12 15:36 [Qemu-devel] [PULL 0/8] virtio, pc, pci: fixes, cleanups, tests Michael S. Tsirkin
2019-07-10 14:14 ` [Qemu-devel] [PATCH] virtio-balloon: fix QEMU 4.0 config size migration incompatibility Stefan Hajnoczi
2019-07-10 15:24   ` Dr. David Alan Gilbert
2019-07-11  7:18   ` Wolfgang Bumiller
2019-07-11  8:30     ` Dr. David Alan Gilbert
2019-07-12 15:36   ` [Qemu-devel] [PULL 3/8] " Michael S. Tsirkin
2019-07-12 15:36 ` [Qemu-devel] [PULL 1/8] xio3130_downstream: typo fix Michael S. Tsirkin
2019-07-12 15:36 ` [Qemu-devel] [PULL 2/8] pcie: consistent names for function args Michael S. Tsirkin
2019-07-15  8:45 ` [Qemu-devel] [PULL 0/8] virtio, pc, pci: fixes, cleanups, tests Peter Maydell
2019-07-08  9:24 [Qemu-devel] [PATCH v3 0/2] tests: acpi: improve tests reproducability Igor Mammedov
2019-07-08  9:24 ` [Qemu-devel] [PATCH v3 1/2] tests: acpi: do not require IASL for dumping AML blobs Igor Mammedov
2019-07-12 15:36   ` [Qemu-devel] [PULL 4/8] " Michael S. Tsirkin
2019-07-08  9:24 ` [Qemu-devel] [PATCH v3 2/2] tests: acpi: do not skip tests when IASL is not installed Igor Mammedov
2019-07-12 15:36   ` [Qemu-devel] [PULL 5/8] " Michael S. Tsirkin

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=bff8da22-a55e-ba7b-16b7-7d1fac3f355e@redhat.com \
    --to=david@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=mst@redhat.com \
    --cc=pagupta@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).