Lines Matching +full:loc +full:- +full:code
1 // SPDX-License-Identifier: GPL-2.0
6 //! usage by Rust code in the kernel and is shared by all of them.
8 //! In other words, all the rest of the Rust code in the kernel (e.g. kernel
16 // Please see https://github.com/Rust-for-Linux/linux/issues/2 for details on
59 // Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate).
163 fn init(module: &'static ThisModule) -> error::Result<Self>; in init()
166 /// A module that is pinned and initialised in-place.
171 fn init(module: &'static ThisModule) -> impl pin_init::PinInit<Self, error::Error>; in init()
175 fn init(module: &'static ThisModule) -> impl pin_init::PinInit<Self, error::Error> { in init()
209 pub const unsafe fn from_ptr(ptr: *mut bindings::module) -> ThisModule { in from_ptr()
216 pub const fn as_ptr(&self) -> *mut bindings::module { in as_ptr()
223 fn panic(info: &core::panic::PanicInfo<'_>) -> ! { in panic()
255 /// // in-bounds of the same allocation as `b_ptr`.
300 // For non-x86 arches we just pass through to `asm!`.
325 /// // - A path like "rust/kernel/example.rs" if `file_as_c_str()` is available.
326 /// // - "<Location::file_as_c_str() not supported>" otherwise.
340 pub fn file_from_location<'a>(loc: &'a core::panic::Location<'a>) -> &'a core::ffi::CStr { in file_from_location()
343 loc.file_as_c_str() in file_from_location()
348 loc.file_with_nul() in file_from_location()
353 let _ = loc; in file_from_location()