[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230203100418.2981144-3-mie@igel.co.jp>
Date: Fri, 3 Feb 2023 19:04:16 +0900
From: Shunsuke Mie <mie@...l.co.jp>
To: Lorenzo Pieralisi <lpieralisi@...nel.org>
Cc: Krzysztof WilczyĆski <kw@...ux.com>,
Manivannan Sadhasivam <mani@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Shunsuke Mie <mie@...l.co.jp>, Frank Li <Frank.Li@....com>,
Jon Mason <jdmason@...zu.us>,
Ren Zhijie <renzhijie2@...wei.com>,
Takanari Hayama <taki@...l.co.jp>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
virtualization@...ts.linux-foundation.org
Subject: [RFC PATCH 2/4] virtio_ring: remove const from vring getter
There are some method to manage the virto ring in Linux kernel. e.g. vhost
and vringh. Remove const from the getter in order to control vring with
other APIs, such as vringh.
Signed-off-by: Shunsuke Mie <mie@...l.co.jp>
Signed-off-by: Takanari Hayama <taki@...l.co.jp>
---
drivers/virtio/virtio_ring.c | 2 +-
include/linux/virtio.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 2e7689bb933b..aa0c455d402b 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -2857,7 +2857,7 @@ dma_addr_t virtqueue_get_used_addr(struct virtqueue *_vq)
EXPORT_SYMBOL_GPL(virtqueue_get_used_addr);
/* Only available for split ring */
-const struct vring *virtqueue_get_vring(struct virtqueue *vq)
+struct vring *virtqueue_get_vring(struct virtqueue *vq)
{
return &to_vvq(vq)->split.vring;
}
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index dcab9c7e8784..83530b7bc2e9 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -88,7 +88,7 @@ unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
bool virtqueue_is_broken(struct virtqueue *vq);
-const struct vring *virtqueue_get_vring(struct virtqueue *vq);
+struct vring *virtqueue_get_vring(struct virtqueue *vq);
dma_addr_t virtqueue_get_desc_addr(struct virtqueue *vq);
dma_addr_t virtqueue_get_avail_addr(struct virtqueue *vq);
dma_addr_t virtqueue_get_used_addr(struct virtqueue *vq);
--
2.25.1
Powered by blists - more mailing lists