Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp985981ima; Fri, 1 Feb 2019 14:18:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN7NxMwi38VGSgM46p0QlY5vOVFpM0RbGg7SSr8uQv9QUUkoaUWm0zUKgtx9GiV7OzasVoSy X-Received: by 2002:a17:902:6a8c:: with SMTP id n12mr41730514plk.85.1549059538067; Fri, 01 Feb 2019 14:18:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549059538; cv=none; d=google.com; s=arc-20160816; b=pi0jEQbAg9Jj9c1qvwNKi9TG3e1ssW2BvcLxbKC+y/BYw8c9gwcm8ZkwTJ9xeodpDk oFXXxUL2Bw2ceHmbLvNZWiX90VxyW+MbmhEXa1FMTZfY3u1gl/vVaTXhNSzk1IWwlpp5 YDM1hQKZgNYQEsp4Twl5grh0dLOPVuZq3Kk66NcmQv8kNZyI61+8/Aj7VGRRpHcsqxca RelQduAwPkJ+UJDrYaWph8xB+/Tx7JAJgpl0wyOCvjEJE7FWHWnuxyauxIQnzaVi+rY2 5e5mTViO5ZUpzZ4OdOAGKAQV5B9pHJxlb7Xw9MWznvIPGW3ooRPJcFEN+aFEnn6zuLzm WFWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=FuTjNKeZBB2+OoIXr8La2qWnzO9PCu89SuCxB+mQrmg=; b=WG8Hzp7HMPXecJOXTrbWoFos5IgD1hPjhPP9bf0vnMmagJhtd7AGt+4d0oy+E5DaNZ pqJ+fdV/kJoWW51o7oO6LR4RClzHBXmbScxDr2+wHMHW6FJsognL7PkjmfG9UGErZKCz BVetqzpEdVagi21EZht5VpvRAwjph7Q808yLUCdzITFbiFZ69BFCPffzPY6ayBsOsl0+ AbDy/RUS+myxkSBiTmO8luSFhnJYfbJA7tVD2JloytctSqotv2MR9jh2oNdXHwNQK+wT upbJfu8yo39ZwFrJ1++CRCLeSol8oyGzclvLkbJ7nqpBtv5Hruzz3Ma/5M89ceSIqsDz W4GQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y70si2355904pgd.425.2019.02.01.14.18.41; Fri, 01 Feb 2019 14:18:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbfBAWQD (ORCPT + 99 others); Fri, 1 Feb 2019 17:16:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbfBAWQD (ORCPT ); Fri, 1 Feb 2019 17:16:03 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C7228E58B; Fri, 1 Feb 2019 22:16:03 +0000 (UTC) Received: from redhat.com (ovpn-122-191.rdu2.redhat.com [10.10.122.191]) by smtp.corp.redhat.com (Postfix) with SMTP id EBCE619936; Fri, 1 Feb 2019 22:16:01 +0000 (UTC) Date: Fri, 1 Feb 2019 17:16:01 -0500 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Tiwei Bie , Jason Wang , virtualization@lists.linux-foundation.org Subject: [PATCH] virtio: drop internal struct from UAPI Message-ID: <20190201221553.7210-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 01 Feb 2019 22:16:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no reason to expose struct vring_packed in UAPI - if we do we won't be able to change or drop it, and it's not part of any interface. Let's move it to virtio_ring.c Cc: Tiwei Bie Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 7 ++++++- include/uapi/linux/virtio_ring.h | 10 ---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 412e0c431d87..1c85b3423182 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -152,7 +152,12 @@ struct vring_virtqueue { /* Available for packed ring */ struct { /* Actual memory layout for this queue. */ - struct vring_packed vring; + struct { + unsigned int num; + struct vring_packed_desc *desc; + struct vring_packed_desc_event *driver; + struct vring_packed_desc_event *device; + } vring; /* Driver ring wrap counter. */ bool avail_wrap_counter; diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 2414f8af26b3..4c4e24c291a5 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h @@ -213,14 +213,4 @@ struct vring_packed_desc { __le16 flags; }; -struct vring_packed { - unsigned int num; - - struct vring_packed_desc *desc; - - struct vring_packed_desc_event *driver; - - struct vring_packed_desc_event *device; -}; - #endif /* _UAPI_LINUX_VIRTIO_RING_H */ -- MST