Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: scatterlist: add __rust_helper to helpers

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20251202-define-rust-helper-v1-36-a2e13cbc17a6@google.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Alice Ryhl and committed by
Danilo Krummrich
e4b3118b 74ca60bd

+7 -5
+7 -5
rust/helpers/scatterlist.c
··· 2 2 3 3 #include <linux/dma-direction.h> 4 4 5 - dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg) 5 + __rust_helper dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg) 6 6 { 7 7 return sg_dma_address(sg); 8 8 } 9 9 10 - unsigned int rust_helper_sg_dma_len(struct scatterlist *sg) 10 + __rust_helper unsigned int rust_helper_sg_dma_len(struct scatterlist *sg) 11 11 { 12 12 return sg_dma_len(sg); 13 13 } 14 14 15 - struct scatterlist *rust_helper_sg_next(struct scatterlist *sg) 15 + __rust_helper struct scatterlist *rust_helper_sg_next(struct scatterlist *sg) 16 16 { 17 17 return sg_next(sg); 18 18 } 19 19 20 - void rust_helper_dma_unmap_sgtable(struct device *dev, struct sg_table *sgt, 21 - enum dma_data_direction dir, unsigned long attrs) 20 + __rust_helper void rust_helper_dma_unmap_sgtable(struct device *dev, 21 + struct sg_table *sgt, 22 + enum dma_data_direction dir, 23 + unsigned long attrs) 22 24 { 23 25 return dma_unmap_sgtable(dev, sgt, dir, attrs); 24 26 }