From: Shunsuke Mie <mie@igel.co.jp>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Shunsuke Mie" <mie@igel.co.jp>, "Frank Li" <Frank.Li@nxp.com>,
"Jon Mason" <jdmason@kudzu.us>,
"Ren Zhijie" <renzhijie2@huawei.com>,
"Takanari Hayama" <taki@igel.co.jp>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: [RFC PATCH 2/4] virtio_ring: remove const from vring getter
Date: Fri, 3 Feb 2023 19:04:16 +0900 [thread overview]
Message-ID: <20230203100418.2981144-3-mie@igel.co.jp> (raw)
In-Reply-To: <20230203100418.2981144-1-mie@igel.co.jp>
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@igel.co.jp>
Signed-off-by: Takanari Hayama <taki@igel.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
next prev parent reply other threads:[~2023-02-03 10:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 10:04 [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function Shunsuke Mie
2023-02-03 10:04 ` [RFC PATCH 1/4] virtio_pci: add a definition of queue flag in ISR Shunsuke Mie
2023-02-03 10:16 ` Michael S. Tsirkin
2023-02-07 10:06 ` Shunsuke Mie
2023-02-03 10:04 ` Shunsuke Mie [this message]
2023-02-03 10:04 ` [RFC PATCH 3/4] PCI: endpoint: Introduce virtio library for EP functions Shunsuke Mie
2023-02-03 10:20 ` Michael S. Tsirkin
2023-02-07 11:05 ` Shunsuke Mie
2023-02-03 10:04 ` [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device Shunsuke Mie
2023-02-03 10:22 ` Michael S. Tsirkin
2023-02-03 22:15 ` [EXT] " Frank Li
2023-02-07 10:56 ` Shunsuke Mie
2023-02-07 15:37 ` Frank Li
2023-02-08 5:46 ` Shunsuke Mie
2023-02-07 10:47 ` Shunsuke Mie
2023-02-03 16:45 ` [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function Frank Li
2023-02-07 10:29 ` Shunsuke Mie
2023-02-07 16:02 ` Frank Li
2023-02-14 3:27 ` Shunsuke Mie
2023-03-29 16:46 ` Frank Li
2023-04-05 1:22 ` Shunsuke Mie
2023-04-11 10:22 ` Shunsuke Mie
2023-02-03 21:48 ` Frank Li
2023-02-07 1:43 ` Shunsuke Mie
2023-02-07 3:27 ` Shunsuke Mie
2023-02-05 10:01 ` Michael S. Tsirkin
2023-02-07 10:17 ` Shunsuke Mie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230203100418.2981144-3-mie@igel.co.jp \
--to=mie@igel.co.jp \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=jasowang@redhat.com \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mst@redhat.com \
--cc=renzhijie2@huawei.com \
--cc=taki@igel.co.jp \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®