All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: kvm@vger.kernel.org
Cc: sheng.yang@intel.com, alex.williamson@hp.com
Subject: [PATCH] kvm: device-assignment: Fix kvm_get_irq_route_gsi() return check
Date: Tue, 12 May 2009 16:14:01 -0600	[thread overview]
Message-ID: <20090512221144.5883.46470.stgit@dl380g6-3.ned.telco.ned.telco> (raw)
In-Reply-To: <20090507170834.26367.91907.stgit@dl380g6-3.ned.telco.ned.telco>

Cast to a signed int to test for < 0.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---

 This supersedes "[PATCH] kvm: device-assignment: Catch GSI overflow"

 hw/device-assignment.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index a6cc9b9..5bdae24 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -798,7 +798,7 @@ static void assigned_dev_update_msi(PCIDevice *pci_dev, unsigned int ctrl_pos)
                 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) {
+        if ((int)(assigned_dev->entry->gsi) < 0) {
             perror("assigned_dev_update_msi: kvm_get_irq_route_gsi");
             return;
         }


  parent reply	other threads:[~2009-05-12 22:13 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 ` Alex Williamson [this message]
2009-05-13  3:36   ` [PATCH] kvm: device-assignment: Fix kvm_get_irq_route_gsi() return check 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

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=20090512221144.5883.46470.stgit@dl380g6-3.ned.telco.ned.telco \
    --to=alex.williamson@hp.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng.yang@intel.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 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.