[PATCH 2/6] rust: scatterlist: make SGTable::as_raw() visible to the crate
From: Daniel Almeida
Date: Thu Nov 12 2026 - 12:08:10 EST
SGTable::as_raw() is private to the scatterlist module. Domain::map(),
added later in this series, needs the raw table to pass its scatterlist
to iommu_map_sg().
Make it pub(crate).
Signed-off-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
---
rust/kernel/scatterlist.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust/kernel/scatterlist.rs b/rust/kernel/scatterlist.rs
index 3a5250f85000..a68a9bbb38ed 100644
--- a/rust/kernel/scatterlist.rs
+++ b/rust/kernel/scatterlist.rs
@@ -147,8 +147,9 @@ pub unsafe fn from_raw<'a>(ptr: *mut bindings::sg_table) -> &'a Self {
unsafe { &*ptr.cast() }
}
+ /// Obtain the raw `struct sg_table *`.
#[inline]
- fn as_raw(&self) -> *mut bindings::sg_table {
+ pub(crate) fn as_raw(&self) -> *mut bindings::sg_table {
self.inner.0.get()
}
--
2.56.0