From nobody Mon Feb 9 08:57:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579763931; cv=none; d=zohomail.com; s=zohoarc; b=DEa16eM8LHqaHWVc7nZWGmdtEvEPnzKhBFqRQCUq3GcnixBTxWMuKae4bsCTAUSfKfzFRii4YBgXB/zEP/E/qRGi0EGg5dPI+heRjmpH2ePJulyf1z8zN/35J60BtYPtaPpWC9VbA5XSYo5zpPHW+0IvMJtShXl01DSlRpEIOmE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579763931; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1MaCdSCC18sa84xXKLha22neuWnQ0FyF+hqtGDwgw+w=; b=VucvSEpAYr0T7/clqqjv7R0R3jlBCI8GLymS7HkGlf0pILjzFXvDm3S4uyZeSlnRZGiO2ivQOsYJ0vguwkQ3aTelAxwemxUb+3EFae/V9borFB4u/63J+p/ehFSseDfVvKfcsAm55HSLkHGg3UFpa7vL4Z+dQ02uVxZqNisYkvE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15797639317361009.0446198591615; Wed, 22 Jan 2020 23:18:51 -0800 (PST) Received: from localhost ([::1]:52096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuWlN-0006Jq-JZ for importer@patchew.org; Thu, 23 Jan 2020 02:18:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuWdi-0006SQ-OI for qemu-devel@nongnu.org; Thu, 23 Jan 2020 02:10:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuWdh-0008ON-QF for qemu-devel@nongnu.org; Thu, 23 Jan 2020 02:10:54 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:24078 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuWdh-0008OD-Nj for qemu-devel@nongnu.org; Thu, 23 Jan 2020 02:10:53 -0500 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-131-iUGiP2cdPkm6IAhHvB2Ugg-1; Thu, 23 Jan 2020 02:10:51 -0500 Received: by mail-wm1-f70.google.com with SMTP id z2so243758wmf.5 for ; Wed, 22 Jan 2020 23:10:51 -0800 (PST) Received: from redhat.com (bzq-79-176-0-156.red.bezeqint.net. [79.176.0.156]) by smtp.gmail.com with ESMTPSA id p5sm1781351wrt.79.2020.01.22.23.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 23:10:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579763453; 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=1MaCdSCC18sa84xXKLha22neuWnQ0FyF+hqtGDwgw+w=; b=OKTkr3ws/Qk/kXTHbIkCAOsQaxsUuFJ5fHk1LfJVCMARy9quCspG/wUy3wpOT9qdaLTPBP dd3aFhlj2LxmsSj+/pV4q9rKuY38jvMIpSM6CrgJAqbJsLdtKKH/Yb4uquc/gbOAL2lTFr OMHD7JwK0ac2u7chVvqGsbVMCeH0BEQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JmSFm2DvEaju83wiB8EwbENmzUyJC9M0V+2bn9XbrpU=; b=KDDjHhyWk1fwT6inegnUgQa5Yyyh/t8DEegXYKc283ufy7Fm7H4nTOnH2+qw0zvRD+ Fv2K6s4KaZuFfE+e3XLKYGj/UYG9p5kJNesESEEpPmqVyO4oLKANR413QjIGEi2s+RyE H2M+BQy15oHDohouAd78pWEzcvc5lVA+fBiiNRxeuCzWdZ3by/RqiU0ajGYz3QUEb9XF U+QZ7BqqiNdZ0LBisghNSon/DjVeZ42pxRpn1ep4eG1Nc5dqanLqhIPluFCoiSla1L4q AZd0aGF8cRtLipoV33KiWGMdEj9fSDRUPr/ctODvomirWtjmM9g1oTcQ5/lkQ9xlDg69 yGNA== X-Gm-Message-State: APjAAAUzijHBjqHPOQN79jbDyPcaD86NDcKDMzHAxOp1PvMfAIPeU33Z vAiWpfW9RWWFaIbiWRJhZmJ4z+ywXmlilpiA/8zs5Q1xvVgL5vxqAcoOuyrVJS6EzFCGPvOLRWZ nbcwT4BZfV9c90vo= X-Received: by 2002:a05:600c:22d3:: with SMTP id 19mr2462251wmg.20.1579763450158; Wed, 22 Jan 2020 23:10:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyX91Oz/AP/cCNyEUMSD0zZcgLNBF6XWbTUBwQc5ZFDUR+UVkZ6rwBzgLfrEU8xe0L/TMHwCQ== X-Received: by 2002:a05:600c:22d3:: with SMTP id 19mr2462238wmg.20.1579763449993; Wed, 22 Jan 2020 23:10:49 -0800 (PST) Date: Thu, 23 Jan 2020 02:10:47 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v3 13/18] virtio-scsi: convert to new virtio_delete_queue Message-ID: <20200123070913.626488-14-mst@redhat.com> References: <20200123070913.626488-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200123070913.626488-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-MC-Unique: iUGiP2cdPkm6IAhHvB2Ugg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Pan Nengyuan , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan Use virtio_delete_queue to make it more clear. Signed-off-by: Pan Nengyuan Message-Id: <20200117075547.60864-3-pannengyuan@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- hw/scsi/virtio-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 858b3aaccb..d3af42ef92 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -945,10 +945,10 @@ void virtio_scsi_common_unrealize(DeviceState *dev) VirtIOSCSICommon *vs =3D VIRTIO_SCSI_COMMON(dev); int i; =20 - virtio_del_queue(vdev, 0); - virtio_del_queue(vdev, 1); + virtio_delete_queue(vs->ctrl_vq); + virtio_delete_queue(vs->event_vq); for (i =3D 0; i < vs->conf.num_queues; i++) { - virtio_del_queue(vdev, i + 2); + virtio_delete_queue(vs->cmd_vqs[i]); } g_free(vs->cmd_vqs); virtio_cleanup(vdev); --=20 MST