[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 01/10] msix: Follow CODING_STYLE
From: |
Cao jin |
Subject: |
[Qemu-devel] [PATCH v5 01/10] msix: Follow CODING_STYLE |
Date: |
Thu, 3 Nov 2016 12:06:28 +0800 |
CC: Markus Armbruster <address@hidden>
CC: Marcel Apfelbaum <address@hidden>
CC: Michael S. Tsirkin <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Cao jin <address@hidden>
---
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;
}
--
2.1.0
- [Qemu-devel] [PATCH v5 00/10] Convert msix_init() to error, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 08/10] vmxnet3: fix reference leak issue, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 10/10] msi_init: convert assert to return -errno, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 01/10] msix: Follow CODING_STYLE,
Cao jin <=
- [Qemu-devel] [PATCH v5 02/10] hcd-xhci: check & correct param before using it, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 04/10] megasas: change behaviour of msix switch, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 05/10] hcd-xhci: change behaviour of msix switch, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 06/10] megasas: remove unnecessary megasas_use_msix(), Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 07/10] megasas: undo the overwrites of msi user configuration, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 09/10] vmxnet3: remove unnecessary internal msix flag, Cao jin, 2016/11/03
- [Qemu-devel] [PATCH v5 03/10] pci: Convert msix_init() to Error and fix callers to check it, Cao jin, 2016/11/03