lkml.org 
[lkml]   [2026]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH RFC 2/6] rust/helpers: add virtio.c
On Tue, May 5, 2026 at 10:14 AM Manos Pitsidianakis
<manos@pitsidianak.is> wrote:
>
> Some internal kernel virtio API functions are inline macros, so define
> their symbols in a helper file.
>
> Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
> ---
> MAINTAINERS | 6 ++++++
> rust/helpers/helpers.c | 3 +++
> rust/helpers/virtio.c | 35 +++++++++++++++++++++++++++++++++++
> 3 files changed, 44 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d1cc0e12fe1f004da89b1aa339116908f642e894..48c9c666d90b5a256ab6fae1f42508b789a0ce50 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -27930,6 +27930,12 @@ F: include/uapi/linux/virtio_*.h
> F: net/vmw_vsock/virtio*
> F: tools/virtio/
>
> +VIRTIO CORE API BINDINGS [RUST]
> +M: Manos Pitsidianakis <manos@pitsidianak.is>
> +L: virtualization@lists.linux.dev
> +S: Maintained
> +F: rust/helpers/virtio.c
> +
> VIRTIO CRYPTO DRIVER
> M: Gonglei <arei.gonglei@huawei.com>
> L: virtualization@lists.linux.dev
> diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
> index a3c42e51f00a0990bea81ebce6e99bb397ce7533..84b54690d95be37699ef9a9c4d7cedec0bbae6d3 100644
> --- a/rust/helpers/helpers.c
> +++ b/rust/helpers/helpers.c
> @@ -62,6 +62,9 @@
> #include "uaccess.c"
> #include "usb.c"
> #include "vmalloc.c"
> +#if defined(CONFIG_VIRTIO)
> +#include "virtio.c"
> +#endif /* defined(CONFIG_VIRTIO) */

Please move this ifdef inside the file instead, to match all other
files with similar ifdefs.

Alice

\
 
 \ /
  Last update: 2026-05-07 10:28    [W:0.085 / U:69.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog