[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/25] block/nvme: Move definitions before structure declarations
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 09/25] block/nvme: Move definitions before structure declarations |
Date: |
Tue, 27 Oct 2020 14:55:31 +0100 |
To be able to use some definitions in structure declarations,
move them earlier. No logical change.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
block/nvme.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index be14350f959..30075e230ca 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -41,6 +41,16 @@
typedef struct BDRVNVMeState BDRVNVMeState;
+/* Same index is used for queues and IRQs */
+#define INDEX_ADMIN 0
+#define INDEX_IO(n) (1 + n)
+
+/* This driver shares a single MSIX IRQ for the admin and I/O queues */
+enum {
+ MSIX_SHARED_IRQ_IDX = 0,
+ MSIX_IRQ_COUNT = 1
+};
+
typedef struct {
int32_t head, tail;
uint8_t *queue;
@@ -81,15 +91,6 @@ typedef struct {
QEMUBH *completion_bh;
} NVMeQueuePair;
-#define INDEX_ADMIN 0
-#define INDEX_IO(n) (1 + n)
-
-/* This driver shares a single MSIX IRQ for the admin and I/O queues */
-enum {
- MSIX_SHARED_IRQ_IDX = 0,
- MSIX_IRQ_COUNT = 1
-};
-
struct BDRVNVMeState {
AioContext *aio_context;
QEMUVFIOState *vfio;
--
2.26.2
- Re: [PATCH 03/25] block/nvme: Report warning with warn_report(), (continued)
Re: [PATCH 03/25] block/nvme: Report warning with warn_report(), Auger Eric, 2020/10/28
Re: [PATCH 03/25] block/nvme: Report warning with warn_report(), Stefan Hajnoczi, 2020/10/28
[PATCH 05/25] block/nvme: Trace nvme_poll_queue() per queue, Philippe Mathieu-Daudé, 2020/10/27
[PATCH 06/25] block/nvme: Improve nvme_free_req_queue_wait() trace information, Philippe Mathieu-Daudé, 2020/10/27
[PATCH 09/25] block/nvme: Move definitions before structure declarations,
Philippe Mathieu-Daudé <=
[PATCH 07/25] block/nvme: Trace queue pair creation/deletion, Philippe Mathieu-Daudé, 2020/10/27
[PATCH 10/25] block/nvme: Use unsigned integer for queue counter/size, Philippe Mathieu-Daudé, 2020/10/27
[PATCH 11/25] block/nvme: Make nvme_identify() return boolean indicating error, Philippe Mathieu-Daudé, 2020/10/27