From nobody Fri May 3 23:42:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=bytedance.com ARC-Seal: i=1; a=rsa-sha256; t=1617282228; cv=none; d=zohomail.com; s=zohoarc; b=cZujtDPPZAyS0r3Wr7B5k2io/xXoFTlay7Z5/XTTn8nJhYRDwmezGNeId/+eLtd9d7E6cxKNhitH5w1JSN0QzhSvmYWy6kKrqWLAUR+asfldiRvl3VOGhGMXiQw5wBPgsXmT1m1ZsDIitRQCMB/w5vaU2JJe6fnNJqOUxZrBgTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617282228; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=zYXVaVVxslI/kZvLWhGMg+7aQ+uKk2gx4k5/W+HD3dk=; b=jS7cbE+IR4nhuFznHdl6m5PgK/rfMit7fHISg1+A9q0mq9YFZPMh377iqpHj6BBZq50BV+XS4+xaKGyjkJzpuRmUSWTczCUqeFdk9WG0qLlGgGlwCVl9ooI7mlyaF/Xl2gvpUx2sWY5BcKGmSIJT8A89o4rggaec2vvLaQzkUFg= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1617282228611637.2406674360443; Thu, 1 Apr 2021 06:03:48 -0700 (PDT) Received: from localhost ([::1]:45752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRwzB-0001sB-Hk for importer@patchew.org; Thu, 01 Apr 2021 09:03:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRwu4-0005M1-SG for qemu-devel@nongnu.org; Thu, 01 Apr 2021 08:58:28 -0400 Received: from [139.177.225.236] (port=57456 helo=C02CQ3PXMD6P.localdomain) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRwu0-0004Sk-Eo for qemu-devel@nongnu.org; Thu, 01 Apr 2021 08:58:27 -0400 Received: by C02CQ3PXMD6P.localdomain (Postfix, from userid 501) id 42B05803DB7; Thu, 1 Apr 2021 20:58:20 +0800 (CST) From: Wentao Fan To: qemu-devel@nongnu.org Subject: [PATCH] hw/virtio: remove redundant code Date: Thu, 1 Apr 2021 20:58:09 +0800 Message-Id: <20210401125808.89241-1-fanwentao.0130@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 139.177.225.236 (failed) 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; Received-SPF: none client-ip=139.177.225.236; envelope-from=admin@C02CQ3PXMD6P.localdomain; helo=C02CQ3PXMD6P.localdomain X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NO_DNS_FOR_FROM=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: jasowang@redhat.com, "Michael S. Tsirkin" , Fan Wentao Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Fan Wentao Signed-off-by: Wentao Fan Acked-by: Jason Wang --- hw/virtio/virtio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 07f4e60b30..aa5c283102 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -173,8 +173,7 @@ static void virtio_init_region_cache(VirtIODevice *vdev= , int n) } new =3D g_new0(VRingMemoryRegionCaches, 1); size =3D virtio_queue_get_desc_size(vdev, n); - packed =3D virtio_vdev_has_feature(vq->vdev, VIRTIO_F_RING_PACKED) ? - true : false; + packed =3D virtio_vdev_has_feature(vq->vdev, VIRTIO_F_RING_PACKED); len =3D address_space_cache_init(&new->desc, vdev->dma_as, addr, size, packed); if (len < size) { --=20 2.24.3 (Apple Git-128)