search for: as_ref

Displaying 3 results from an estimated 3 matches for "as_ref".

Did you mean: is_ref
2025 Feb 03
0
[PATCH 1/2] gpu: nova-core: add initial driver stub
...r for NovaCore { >> + type IdInfo = (); >> + const ID_TABLE: pci::IdTable<Self::IdInfo> = &PCI_TABLE; >> + >> + fn probe(pdev: &mut pci::Device, _info: &Self::IdInfo) -> Result<Pin<KBox<Self>>> { >> + dev_dbg!(pdev.as_ref(), "Probe Nova Core GPU driver.\n"); >> + >> + pdev.enable_device_mem()?; >> + pdev.set_master(); >> + >> + let bar = pdev.iomap_region_sized::<BAR0_SIZE>(0, c_str!("nova-core"))?; >> + >> + let this = K...
2024 May 30
0
[RFC PATCH 7/8] rust: add firmware abstractions
...ce count. > + pub unsafe fn from_raw(ptr: *mut bindings::device) -> ARef<Self> { > > + /// Callers must ensure that `ptr` is valid, non-null, and has a non-zero reference count for > + /// the entire duration when the returned reference exists. > + pub unsafe fn as_ref<'a>(ptr: *mut bindings::device) -> &'a Self { > + // SAFETY: Guaranteed by the safety requirements of the function. > + unsafe { &*ptr.cast() } > + } >
2023 Apr 05
3
[PATCH v2 0/2] rust: virtio: add virtio support
This used to be a single patch, but I split it into two with the addition of struct Scatterlist. Again a bit new with Rust submissions. I was told by Gary Guo to rebase on top of rust-next, but it seems *very* behind? The first patch does not build on its own due to a dead_code warning. It is hard to not have dead code when one is adding infrastructure to be used by others at a later