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 <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- block/nvme.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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) { -- 2.26.2
