From patchwork Thu Jan 23 13:50:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11348703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 555F91398 for ; Thu, 23 Jan 2020 16:43:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AF0821569 for ; Thu, 23 Jan 2020 16:43:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="alR/cq8y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AF0821569 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iufa3-0000Y6-In for patchwork-qemu-devel@patchwork.kernel.org; Thu, 23 Jan 2020 11:43:43 -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 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= 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) 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 = VIRTIO_SCSI_COMMON(dev); int i; - virtio_del_queue(vdev, 0); - virtio_del_queue(vdev, 1); + virtio_delete_queue(vs->ctrl_vq); + virtio_delete_queue(vs->event_vq); for (i = 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);