qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Cao jin <caoj.fnst@cn.fujitsu.com>,
	Markus Armbruster <armbru@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: [Qemu-devel] [PULL 11/16] msix: Follow CODING_STYLE
Date: Wed, 25 Jan 2017 00:36:51 +0200	[thread overview]
Message-ID: <1485297322-10595-12-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1485297322-10595-1-git-send-email-mst@redhat.com>

From: Cao jin <caoj.fnst@cn.fujitsu.com>

CC: Markus Armbruster <armbru@redhat.com>
CC: Marcel Apfelbaum <marcel@redhat.com>
CC: Michael S. Tsirkin <mst@redhat.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/pci/msix.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 0ec1cb1..0cee631 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -447,8 +447,10 @@ void msix_notify(PCIDevice *dev, unsigned vector)
 {
     MSIMessage msg;
 
-    if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector])
+    if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector]) {
         return;
+    }
+
     if (msix_is_masked(dev, vector)) {
         msix_set_pending(dev, vector);
         return;
@@ -483,8 +485,10 @@ void msix_reset(PCIDevice *dev)
 /* Mark vector as used. */
 int msix_vector_use(PCIDevice *dev, unsigned vector)
 {
-    if (vector >= dev->msix_entries_nr)
+    if (vector >= dev->msix_entries_nr) {
         return -EINVAL;
+    }
+
     dev->msix_entry_used[vector]++;
     return 0;
 }
-- 
MST

  parent reply	other threads:[~2017-01-24 22:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 22:36 [Qemu-devel] [PULL 00/16] virtio, vhost, pci: fixes, features Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 01/16] compiler: drop ; after BUILD_BUG_ON Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 02/16] compiler: rework BUG_ON using a struct Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 03/16] compiler: expression version of QEMU_BUILD_BUG_ON Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 04/16] ARRAY_SIZE: check that argument is an array Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 05/16] pci: mark ROMs read-only Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 06/16] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc() Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 07/16] hw/pcie: Introduce a base class for PCI Express Root Ports Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 08/16] hw/ioh3420: derive from PCI Express Root Port base class Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 09/16] hw/pcie: Introduce Generic PCI Express Root Port Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 10/16] hw/i386: check if nvdimm is enabled before plugging Michael S. Tsirkin
2017-01-24 22:36 ` Michael S. Tsirkin [this message]
2017-01-24 22:36 ` [Qemu-devel] [PULL 12/16] hcd-xhci: check & correct param before using it Michael S. Tsirkin
2017-01-24 22:36 ` [Qemu-devel] [PULL 13/16] pci: Convert msix_init() to Error and fix callers Michael S. Tsirkin
2017-01-24 22:37 ` [Qemu-devel] [PULL 14/16] virtio: make virtio_should_notify static Michael S. Tsirkin
2017-01-24 22:37 ` [Qemu-devel] [PULL 15/16] vhost: skip ROM sections Michael S. Tsirkin
2017-01-24 22:37 ` [Qemu-devel] [PULL 16/16] vhost-user: delete chardev on cleanup Michael S. Tsirkin
2017-01-25 16:36 ` [Qemu-devel] [PULL 00/16] virtio, vhost, pci: fixes, features Peter Maydell
2017-01-25 18:02   ` Marcel Apfelbaum
2017-01-25 18:08     ` Peter Maydell
2017-01-25 18:45       ` Marcel Apfelbaum
2017-01-25 19:24       ` Peter Maydell
2017-01-25 21:57         ` 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=1485297322-10595-12-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=marcel@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).