diff mbox series

[01/15] block/nvme: Move nvme_poll_cb() earlier

Message ID 20201014155810.102841-2-philmd@redhat.com
State New
Headers show
Series block/nvme: Improve debugging experience and minor fixes | expand

Commit Message

Philippe Mathieu-Daudé Oct. 14, 2020, 3:57 p.m. UTC
We are going to use this callback in nvme_add_io_queue()
in few commits. To avoid forward-declaring it, move it
before. No logical change.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 block/nvme.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/block/nvme.c b/block/nvme.c
index 5f662c55bbe..a534c61b6b6 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -627,6 +627,16 @@  static void nvme_handle_event(EventNotifier *n)
     nvme_poll_queues(s);
 }
 
+static bool nvme_poll_cb(void *opaque)
+{
+    EventNotifier *e = opaque;
+    BDRVNVMeState *s = container_of(e, BDRVNVMeState,
+                                    irq_notifier[MSIX_SHARED_IRQ_IDX]);
+
+    trace_nvme_poll_cb(s);
+    return nvme_poll_queues(s);
+}
+
 static bool nvme_add_io_queue(BlockDriverState *bs, Error **errp)
 {
     BDRVNVMeState *s = bs->opaque;
@@ -669,16 +679,6 @@  out_error:
     return false;
 }
 
-static bool nvme_poll_cb(void *opaque)
-{
-    EventNotifier *e = opaque;
-    BDRVNVMeState *s = container_of(e, BDRVNVMeState,
-                                    irq_notifier[MSIX_SHARED_IRQ_IDX]);
-
-    trace_nvme_poll_cb(s);
-    return nvme_poll_queues(s);
-}
-
 static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
                      Error **errp)
 {