From nobody Thu Nov 13 12:01:28 2025 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=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579797855; cv=none; d=zohomail.com; s=zohoarc; b=KLbAO9f10e3lmSFwpEdo0GASlsHJJagjpLjndU/p09G0JAxJL0FR6KjFQC0X8NuPhwijznSrP5vmnRYn2SFZVhD9KvA7P3szMuvbif5HGye598gzWptVqFV52OmLm0/9F1tifczS4EP9FEwRfxxuAh2Pxf6NXprHuHEMw02cBhs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579797855; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=jErQDorg0miDYGPyBiqOf+cKmO5GpKu5KUL5RJhIogQ=; b=bELxTs7PRCs7IsMmbegxO5a+8FizGdYGz6z1l8QTwfcaBLdQdm3NTbUn/DAlBrwt4gVSn3OFAGqDVQpfMhu2HBtUYajLEdfymovfrqy6h1z/mPEie62d6aRjAdXRihHFcpIPlT+wrAa0ArGSMNrJfm7qrrqvbx+QX+cHe1Kzyt4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1579797855147915.0649618468967; Thu, 23 Jan 2020 08:44:15 -0800 (PST) Received: from localhost ([::1]:60666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iufaX-0000Y6-MZ for importer@patchew.org; Thu, 23 Jan 2020 11:44:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuctV-0008MU-Ix for qemu-devel@nongnu.org; Thu, 23 Jan 2020 08:51:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuctU-000872-Ga for qemu-devel@nongnu.org; Thu, 23 Jan 2020 08:51:37 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:57224 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 1iuctU-00084t-DZ for qemu-devel@nongnu.org; Thu, 23 Jan 2020 08:51:36 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-Ek16kqjvNGCOL9y4mKLEgA-1; Thu, 23 Jan 2020 08:51:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1E69800D4C; Thu, 23 Jan 2020 13:51:32 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.112.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5C0E85785; Thu, 23 Jan 2020 13:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579787496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jErQDorg0miDYGPyBiqOf+cKmO5GpKu5KUL5RJhIogQ=; b=alR/cq8yVfG54JwhBNK/vFNb3ZCWQMmgpTjC0eONJGmMeMbqux2Kj66Ums8bqRtUBWkf0V SlC8DiKvV0DLxZxdjp2V5iOlzpFxAwDntbHKSO/boQumc0VE/N1NT7K0me9HjEnX6wmxWu oly7DBPujjJDl2ACsLmhxvsOh7G+o+0= From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 22/59] virtio-scsi: convert to new virtio_delete_queue Date: Thu, 23 Jan 2020 14:50:12 +0100 Message-Id: <1579787449-27599-23-git-send-email-pbonzini@redhat.com> In-Reply-To: <1579787449-27599-1-git-send-email-pbonzini@redhat.com> References: <1579787449-27599-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: Ek16kqjvNGCOL9y4mKLEgA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: Pan Nengyuan Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan Use virtio_delete_queue to make it more clear. Signed-off-by: Pan Nengyuan Reviewed-by: Stefan Hajnoczi Message-Id: <20200117075547.60864-3-pannengyuan@huawei.com> Signed-off-by: Paolo Bonzini --- 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 858b3aa..d3af42e 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 1.8.3.1