Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1151872pxy; Fri, 23 Apr 2021 01:11:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEVkeMH1HPH6te4zm4cF3/WOZEt/LeXIEQS2WCLZZEgpNV/qfwHYYt0b7FimPpO+G2SVSL X-Received: by 2002:a62:1c0f:0:b029:25f:ba3c:9cc0 with SMTP id c15-20020a621c0f0000b029025fba3c9cc0mr2580632pfc.56.1619165504734; Fri, 23 Apr 2021 01:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619165504; cv=none; d=google.com; s=arc-20160816; b=Al/qECMRrL3HuPn1KnhIVJ8YrVOMPKKAlR3nC42OiZJFdQ9JB5jeLSi430++jHxIB4 QDHqXEKwDef9rTk5kEK3L67c/elumkVaBMQ0ngpkUTuFaZr0+KNwBA94B5GebZRd1tsd HfiEOXAeiQwTBVzq0ZvKFAinE2Xc0VIpr2RkNWUO+KLFM6Opkuxw9HMZMs3B/gj2ljLh 97yTRf6FF2g/51vto8fGGi9o8qdcRv4cYh37H+bccjG8w6TpFbKOBf1kO0B64MyRwTyd WLgaQdXpVOT9HAsYmYEfFqXn1ftrX8LEjHXP9gQqDJNU7N5IPxf3SkLbmU0yJPyiH9B+ oqZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6Iy/gnaCvLxp4h+bVzLUI8j+eO2vvAPrkrWPiAFq8VY=; b=NTR+h8BPng+y2fOX5yxEL0OJPjatMMRUa8ep+DQrsWKLWK/xhkJPn9H7tp98SBGZP+ ggscoP8gxyp0s0WVoLHl+/mXL+3/1gJOoOHTUaLvBUF9ErUbs3S5znjhkUzVIfJydOmH V6EHs9fd0RIBjiSgFUMiOmBiwDQ6jfoaansuQE1vPM+Rq/JfaFZTqhn84rkKf1f/GUGX NfORQn6y1F2+WPD0q0/G7MSi0pjj5vH72VamVxJrzmBr0XTEw1HGQJWx5ZQQz+Ij2g31 OmLqqLiN+7KGVRRR5835PpMHG3eoFZp23CW2EkYwfxstdgbQE75MMmP/zfgIQXUsyIcE sZ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RmQ1CyOx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si5760413pfh.285.2021.04.23.01.11.32; Fri, 23 Apr 2021 01:11:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RmQ1CyOx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241398AbhDWILL (ORCPT + 99 others); Fri, 23 Apr 2021 04:11:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50260 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241391AbhDWILK (ORCPT ); Fri, 23 Apr 2021 04:11:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619165434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Iy/gnaCvLxp4h+bVzLUI8j+eO2vvAPrkrWPiAFq8VY=; b=RmQ1CyOxagxSjj3sVZ+9vjOqGeHmr6NREDnqyhpVB5YE3pBwZGxe7FmtGgdr3rmLmuylEN Kip8b6nbX2WbkhbUbm+X9X2RjtcWuwYQCL11lfw+8bKBTG+KLGSq5IXBbMopaZDoX0T6Da U3uJPKLeUeWUce1jMj/PlOozLJIoxPo= 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-434-kC-6-mg5MY6T21YRHKeAlA-1; Fri, 23 Apr 2021 04:10:32 -0400 X-MC-Unique: kC-6-mg5MY6T21YRHKeAlA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E10B918397A8; Fri, 23 Apr 2021 08:10:30 +0000 (UTC) Received: from localhost.localdomain (ovpn-13-225.pek2.redhat.com [10.72.13.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A1455C5E0; Fri, 23 Apr 2021 08:10:26 +0000 (UTC) From: Jason Wang To: mst@redhat.com, jasowang@redhat.com Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, xieyongji@bytedance.com, stefanha@redhat.com, file@sect.tu-berlin.de, ashish.kalra@amd.com, konrad.wilk@oracle.com, kvm@vger.kernel.org, hch@infradead.org Subject: [RFC PATCH V2 2/7] virtio_ring: rename vring_desc_extra_packed Date: Fri, 23 Apr 2021 16:09:37 +0800 Message-Id: <20210423080942.2997-3-jasowang@redhat.com> In-Reply-To: <20210423080942.2997-1-jasowang@redhat.com> References: <20210423080942.2997-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename vring_desc_extra_packed to vring_desc_extra since the structure are pretty generic which could be reused by split virtqueue as well. Signed-off-by: Jason Wang --- drivers/virtio/virtio_ring.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index e1e9ed42e637..c25ea5776687 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -77,7 +77,7 @@ struct vring_desc_state_packed { u16 last; /* The last desc state in a list. */ }; -struct vring_desc_extra_packed { +struct vring_desc_extra { dma_addr_t addr; /* Buffer DMA addr. */ u32 len; /* Buffer length. */ u16 flags; /* Descriptor flags. */ @@ -166,7 +166,7 @@ struct vring_virtqueue { /* Per-descriptor state. */ struct vring_desc_state_packed *desc_state; - struct vring_desc_extra_packed *desc_extra; + struct vring_desc_extra *desc_extra; /* DMA address and size information */ dma_addr_t ring_dma_addr; @@ -912,7 +912,7 @@ static struct virtqueue *vring_create_virtqueue_split( */ static void vring_unmap_state_packed(const struct vring_virtqueue *vq, - struct vring_desc_extra_packed *state) + struct vring_desc_extra *state) { u16 flags; @@ -1651,13 +1651,13 @@ static struct virtqueue *vring_create_virtqueue_packed( vq->free_head = 0; vq->packed.desc_extra = kmalloc_array(num, - sizeof(struct vring_desc_extra_packed), + sizeof(struct vring_desc_extra), GFP_KERNEL); if (!vq->packed.desc_extra) goto err_desc_extra; memset(vq->packed.desc_extra, 0, - num * sizeof(struct vring_desc_extra_packed)); + num * sizeof(struct vring_desc_extra)); for (i = 0; i < num - 1; i++) vq->packed.desc_extra[i].next = i + 1; -- 2.25.1