From nobody Mon Feb 9 07:32:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1602691105; cv=none; d=zohomail.com; s=zohoarc; b=fCykKSiGY2+209BLpnLWP7CI9OHe31FgdKe1mJK/M/m1xqNJ56MrcWnWfmuAKLMUL30c116OnYyXe/diq+kHGD0cpnDWAbGWN7JNef5oLjSLVvP96/cl8zQpyHt7L4EYnz2zfNBDlYDgF8cKI7bZezhAIWGGOJttLwA8lSdYNF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602691105; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=NKV0WLjtIuXuPWZBe66EqUXPKE/Tlow7+lo7RAkaIjU=; b=MzaxGIsjqE+DONMkThXFdWO/jI0E9yRWOIdXbEsPkWe0xYTAzH9WEtrJVxj7hARmVN0q1Ss9ge+kJPcetoldw1EAcCbduEcte3TNCpUIvNeat3SkcvipgLQh5CbHy4PA6Kh2wL4Vp83rVDJXlOq3As+fFGR/sAzu2ZRy6/MQ3Tk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1602691105026378.31604381075465; Wed, 14 Oct 2020 08:58:25 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-egBwfysYPBisupkv8g-Ubw-1; Wed, 14 Oct 2020 11:58:22 -0400 Received: by mail-wm1-f70.google.com with SMTP id i9so11300wml.2 for ; Wed, 14 Oct 2020 08:58:21 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (106.red-83-59-162.dynamicip.rima-tde.net. [83.59.162.106]) by smtp.gmail.com with ESMTPSA id u195sm110593wmu.18.2020.10.14.08.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 08:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602691103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NKV0WLjtIuXuPWZBe66EqUXPKE/Tlow7+lo7RAkaIjU=; b=Wl8GFo5ER19Zs17xiPyMuT4i5ZEJO5i0XyjX9wOt4QLVWt544h2wPZwjG7JyXcDKiR3IEX fnuC4XXIon1ArLmGjgasH/CkFucu6xZMcxO2515laKPLCS1ztnf1za0E9UEZtTsQuRTfNe mx/yRlcuWjdcp7GBluhkXZYW4H19Cq4= X-MC-Unique: egBwfysYPBisupkv8g-Ubw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NKV0WLjtIuXuPWZBe66EqUXPKE/Tlow7+lo7RAkaIjU=; b=VTMuZJjiec/bEaJUtoE7OEiqLmv4+CuaXxGHDEDx8QSJ+eiOW9ZPCChG4Q9F2k5F4p kZpbgtG/VkhXwEG8lrHF5Slur9JJ+v2nWu+XgpI0qvnEHbzmq234PyYfmRkcICwimD4E KDiIO7Q4ouiyUv/xBRMYwtjsHHLxWRYLW4l/DrahS9cwwE5sEqqj3xhrWCod9ExJw2IJ /je5/x2zGzjKxa1BBkihDoXLCBL86kxYiM2WpuoQ54S4zypsiSE5Mh3mC6qUC4pke7kT XSAOcqvbPX+TwrvGn6GnLvSPDa9rM4MwHO9NkZyop+BwOCl99RnIItA4U06GNvuhKUT+ MWXA== X-Gm-Message-State: AOAM531xm/zodaqmdSDi3PJtEmB3UCJSqM4lNsIY1Fu6P6fXfTzbCLf7 NySv6XxUz0rG2Ln5/mn4F/617uO1Ws4h30Y9jfyagG2OXmIU8FDGeZc1BUMRUz2U4shJhXcVv/4 siJ5SSR9k1qhoYA== X-Received: by 2002:a1c:9949:: with SMTP id b70mr119914wme.116.1602691097984; Wed, 14 Oct 2020 08:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3oYUQT/8tb+WIc7o1xKH8zo1BJuFESxiUhXIColPAKAlulTqIZ7WoFwBrT5Q3YQ2sW7bX3g== X-Received: by 2002:a1c:9949:: with SMTP id b70mr119902wme.116.1602691097839; Wed, 14 Oct 2020 08:58:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Fam Zheng , Stefan Hajnoczi , Kevin Wolf , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 01/15] block/nvme: Move nvme_poll_cb() earlier Date: Wed, 14 Oct 2020 17:57:56 +0200 Message-Id: <20201014155810.102841-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201014155810.102841-1-philmd@redhat.com> References: <20201014155810.102841-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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); } =20 +static bool nvme_poll_cb(void *opaque) +{ + EventNotifier *e =3D opaque; + BDRVNVMeState *s =3D 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 =3D bs->opaque; @@ -669,16 +679,6 @@ out_error: return false; } =20 -static bool nvme_poll_cb(void *opaque) -{ - EventNotifier *e =3D opaque; - BDRVNVMeState *s =3D 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 namespa= ce, Error **errp) { --=20 2.26.2