From nobody Mon Feb 9 07:56:38 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=1579676548; cv=none; d=zohomail.com; s=zohoarc; b=iWumRKwpLeNrJ55Um6unkYWRqaaEIE3O1EjhwtOZ2oR5pM3jluX2RlStHzDwNuW+gU+GH31iQ/3nfVoQjyT7DOjmVTCukrlTbJeNthjP5X8EM7N2veS1mATuc77vzLcr2Q3PZJJY6puu312TbSD2UuWWK8qqKAEQl0pNB/kTefg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579676548; 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=S/AzMoQcYDOqdA45nSIVKIOlzg7TOCBGhnKMB642S+BXs2m34rLnwFgJSUVA5gouUSAoFstJRC1k2qWQ1R87nPQxWSd9mqSA4rcwwizUCHUfHvv9YqOUqGNUQMTnDhgMLl7VsEDuXzwpiiRerNdDpveQQz5b/ZbZ5iiek/jCy4c= 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 1579676548780766.1261162775193; Tue, 21 Jan 2020 23:02:28 -0800 (PST) Received: from localhost ([::1]:37706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuA1z-0002ya-3V for importer@patchew.org; Wed, 22 Jan 2020 02:02:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36188) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu9qT-0004mi-GT for qemu-devel@nongnu.org; Wed, 22 Jan 2020 01:50:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iu9qS-00087y-HW for qemu-devel@nongnu.org; Wed, 22 Jan 2020 01:50:33 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:50851 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 1iu9qS-00087V-ED for qemu-devel@nongnu.org; Wed, 22 Jan 2020 01:50:32 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-124-Wx9wPHuJPYauqPf8VLB1CA-1; Wed, 22 Jan 2020 01:50:30 -0500 Received: by mail-wm1-f71.google.com with SMTP id c4so1662816wmb.8 for ; Tue, 21 Jan 2020 22:50:29 -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 i10sm56892035wru.16.2020.01.21.22.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 22:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579675832; 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=NiaITZmdEc6liMgCHla5+v3NcjZf5bS7/SDF83yXjUNeKz9eDb2qWOsdkJcqjmhWiguO7z IkzPeEJ7iiXi2CtSoerkxh10/KBG/ffRgZykwKeM+0GWXTMnHSUVeDycyhe6z93knjRvCI qw6d6Eq0nRWSHofsqiUqDTghFmDIVKg= 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=OLMtT4WNpAOBwSqJtjRW+XYvdFPeh35i9mkf0iQ2WlkOrAWKYyfT2fF7duMLT7hT6j 1Y7ks10nLJxU9YA0xOjKjKAn9Vm/M/IygV1f1Nw67lmm0nej+SVQWSemXCpslFAO16nH X20rLb4B+fGrA2vvjO0FXhupwPg7qoHqq8oIF4p4mA8urfsVlgQQm3GCxgvhNRvWUqP1 /+iiBDAMZ2O7CvnqjEOGvhBJ1HoiSJIOo4icYXBWg8QpYDqZB6724Wcida6KqnbUTVDr YG1awJs8CHrBjLsdL3hGGutdq6ZHQUiOPLVGZqy3nQ3+wUKG9I2xMVrtwb3SOEPAiNTO TPyQ== X-Gm-Message-State: APjAAAVuE7dhFVcaZfOYFiRqKyvZFClWEpFLuqarop8vTU1orst5WW4n Wt4KMGH42dSzxb6JHy1btHHBx+toCn2jCUomYGjf950LBIJa0AyVqBLzD1JcsClM6X7jTAV0ZnX KkOs4QtPUafHHyrM= X-Received: by 2002:adf:fd07:: with SMTP id e7mr9257554wrr.21.1579675828449; Tue, 21 Jan 2020 22:50:28 -0800 (PST) X-Google-Smtp-Source: APXvYqz/HrlNqG6YM++k5ZW2aqsZjD8ga4Q+R886x/rU91Zg3OHn+KL/GNKmbOHUUoWAAeNKqTrODw== X-Received: by 2002:adf:fd07:: with SMTP id e7mr9257538wrr.21.1579675828282; Tue, 21 Jan 2020 22:50:28 -0800 (PST) Date: Wed, 22 Jan 2020 01:50:25 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v2 13/17] virtio-scsi: convert to new virtio_delete_queue Message-ID: <20200122064907.512501-14-mst@redhat.com> References: <20200122064907.512501-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200122064907.512501-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-MC-Unique: Wx9wPHuJPYauqPf8VLB1CA-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] [fuzzy] X-Received-From: 205.139.110.61 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