@@ -638,6 +638,15 @@ 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);
+
+ trace_nvme_poll_cb(s);
+ return nvme_poll_queues(s);
+}
+
static bool nvme_add_io_queue(BlockDriverState *bs, Error **errp)
{
BDRVNVMeState *s = bs->opaque;
@@ -680,15 +689,6 @@ out_error:
return false;
}
-static bool nvme_poll_cb(void *opaque)
-{
- EventNotifier *e = opaque;
- BDRVNVMeState *s = container_of(e, BDRVNVMeState, irq_notifier);
-
- trace_nvme_poll_cb(s);
- return nvme_poll_queues(s);
-}
-
static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
Error **errp)
{
We are going to use this callback in nvme_add_io_queue() in the next commit. To avoid forward-declaring it, move it before. No logical change. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- block/nvme.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)