* [PATCH] virtio: allow inlining of trivial virtio_find_vqs function
@ 2025-01-06 9:19 Ahmad Fatoum
2025-01-06 13:25 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-01-06 9:19 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
virtio_find_vqs is just a function pointer call, so move it into a
header, so it can be inlined.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/virtio/virtio.c | 7 -------
include/linux/virtio_config.h | 6 +++++-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index c4854e7d11aa..a0bd147c36c4 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -159,13 +159,6 @@ int virtio_finalize_features(struct virtio_device *dev)
}
EXPORT_SYMBOL_GPL(virtio_finalize_features);
-int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
- struct virtqueue *vqs[])
-{
- return vdev->config->find_vqs(vdev, nvqs, vqs);
-}
-EXPORT_SYMBOL_GPL(virtio_find_vqs);
-
static int virtio_dev_probe(struct device *_d)
{
int err, i;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 6bb1f768b636..6c53f4bc66a4 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -246,8 +246,12 @@ static inline int virtio_set_config(struct virtio_device *vdev, unsigned int off
* @vqs: on success, includes new virtqueues
* @return 0 if OK, -ve on error
*/
+static inline
int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
- struct virtqueue *vqs[]);
+ struct virtqueue *vqs[])
+{
+ return vdev->config->find_vqs(vdev, nvqs, vqs);
+}
/**
* virtio_device_ready - enable vq use in probe function
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio: allow inlining of trivial virtio_find_vqs function
2025-01-06 9:19 [PATCH] virtio: allow inlining of trivial virtio_find_vqs function Ahmad Fatoum
@ 2025-01-06 13:25 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-01-06 13:25 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Mon, 06 Jan 2025 10:19:20 +0100, Ahmad Fatoum wrote:
> virtio_find_vqs is just a function pointer call, so move it into a
> header, so it can be inlined.
>
>
Applied, thanks!
[1/1] virtio: allow inlining of trivial virtio_find_vqs function
https://git.pengutronix.de/cgit/barebox/commit/?id=21520d6ce573 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-06 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-06 9:19 [PATCH] virtio: allow inlining of trivial virtio_find_vqs function Ahmad Fatoum
2025-01-06 13:25 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox