Lines Matching defs:as_raw
78 fn as_raw(&self) -> *mut bindings::scatterlist {
87 // SAFETY: `self.as_raw()` is a valid pointer to a `struct scatterlist`.
88 unsafe { bindings::sg_dma_address(self.as_raw()) }
95 // SAFETY: `self.as_raw()` is a valid pointer to a `struct scatterlist`.
96 unsafe { bindings::sg_dma_len(self.as_raw()) }.into()
152 fn as_raw(&self) -> *mut bindings::sg_table {
158 // SAFETY: `self.as_raw()` is a valid pointer to a `struct sg_table`.
159 let nents = unsafe { (*self.as_raw()).nents };
162 // SAFETY: `self.as_raw()` is a valid pointer to a `struct sg_table`.
163 let ptr = unsafe { (*self.as_raw()).sgl };
209 // - `dev.as_raw()` is a valid pointer to a `struct device`, which is guaranteed to be
213 bindings::dma_map_sgtable(dev.as_raw(), sgt.as_ptr(), dir.into(), 0)
230 // - `self.dev.as_raw()` is a pointer to a valid `struct device`.
237 bindings::dma_unmap_sgtable(self.dev.as_raw(), self.sgt.as_ptr(), self.dir.into(), 0)
285 flags.as_raw(),
293 fn as_raw(&self) -> *mut bindings::sg_table {
356 // SAFETY: `dev.as_raw()` is a valid pointer to a `struct device`.
357 let max_segment = match unsafe { bindings::dma_max_mapping_size(dev.as_raw()) } {
450 // - `self.inner.sgt.as_raw()` is a valid pointer to a `struct sg_table` for the entire
453 unsafe { SGTable::from_raw(self.inner.sgt.as_raw()) }
481 // SAFETY: `entry.as_raw()` is a valid pointer to a `struct scatterlist`.
482 let next = unsafe { bindings::sg_next(entry.as_raw()) };