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: pci: use c_* types via kernel prelude

Update PCI FFI callback signatures to use `c_` from the prelude,
instead of accessing it via `kernel::ffi::`.

Signed-off-by: Abhinav Ananthu <abhinav.ogl@gmail.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250812033101.5257-1-abhinav.ogl@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Abhinav Ananthu and committed by
Danilo Krummrich
b0d73ad1 4005dac6

+2 -2
+2 -2
rust/kernel/pci.rs
··· 60 60 extern "C" fn probe_callback( 61 61 pdev: *mut bindings::pci_dev, 62 62 id: *const bindings::pci_device_id, 63 - ) -> kernel::ffi::c_int { 63 + ) -> c_int { 64 64 // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a 65 65 // `struct pci_dev`. 66 66 // ··· 347 347 // `ioptr` is valid by the safety requirements. 348 348 // `num` is valid by the safety requirements. 349 349 unsafe { 350 - bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut kernel::ffi::c_void); 350 + bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut c_void); 351 351 bindings::pci_release_region(pdev.as_raw(), num); 352 352 } 353 353 }