All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Sheng" <sheng.yang@intel.com>
To: Alex Williamson <alex.williamson@hp.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v2] kvm: device-assignment: Fix kvm_get_irq_route_gsi() return	check
Date: Wed, 13 May 2009 12:58:17 +0800	[thread overview]
Message-ID: <200905131258.18352.sheng.yang@intel.com> (raw)
In-Reply-To: <20090513044337.6737.29376.stgit@dl380g6-3.ned.telco.ned.telco>

On Wednesday 13 May 2009 12:45:11 Alex Williamson wrote:
> Use 'r' for the return value since gsi is unsigned.
>
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
> ---

Acked.

-- 
regards
Yang, Sheng

>
>  v2: Use 'r' instead of a cast, per Sheng Yang
>
>  hw/device-assignment.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/device-assignment.c b/hw/device-assignment.c
> index a6cc9b9..4107915 100644
> --- a/hw/device-assignment.c
> +++ b/hw/device-assignment.c
> @@ -797,11 +797,12 @@ static void assigned_dev_update_msi(PCIDevice
> *pci_dev, unsigned int ctrl_pos) assigned_dev->entry->u.msi.data =
> *(uint16_t *)(pci_dev->config + pci_dev->cap.start + PCI_MSI_DATA_32);
>          assigned_dev->entry->type = KVM_IRQ_ROUTING_MSI;
> -        assigned_dev->entry->gsi = kvm_get_irq_route_gsi(kvm_context);
> -        if (assigned_dev->entry->gsi < 0) {
> +        r = kvm_get_irq_route_gsi(kvm_context);
> +        if (r < 0) {
>              perror("assigned_dev_update_msi: kvm_get_irq_route_gsi");
>              return;
>          }
> +        assigned_dev->entry->gsi = r;
>
>          kvm_add_routing_entry(kvm_context, assigned_dev->entry);
>          if (kvm_commit_irq_routes(kvm_context) < 0) {



      reply	other threads:[~2009-05-13  4:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 17:09 [PATCH] kvm: device-assignment: Catch GSI overflow Alex Williamson
2009-05-07 17:16 ` Alex Williamson
2009-05-08  9:28   ` Sheng Yang
2009-05-12 22:14 ` [PATCH] kvm: device-assignment: Fix kvm_get_irq_route_gsi() return check Alex Williamson
2009-05-13  3:36   ` Yang, Sheng
2009-05-13  3:55     ` Alex Williamson
2009-05-13  4:09       ` Yang, Sheng
2009-05-13  4:45   ` [PATCH v2] " Alex Williamson
2009-05-13  4:58     ` Yang, Sheng [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=200905131258.18352.sheng.yang@intel.com \
    --to=sheng.yang@intel.com \
    --cc=alex.williamson@hp.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.