@@ -224,20 +224,20 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
224
224
// SAFETY: `__this_module` is constructed by the kernel at load time and will not be
225
225
// freed until the module is unloaded.
226
226
#[cfg(MODULE)]
227
- static THIS_MODULE: kernel::ThisModule = unsafe {{
227
+ static THIS_MODULE: :: kernel::ThisModule = unsafe {{
228
228
extern \" C\" {{
229
- static __this_module: kernel::types::Opaque<kernel::bindings::module>;
229
+ static __this_module: :: kernel::types::Opaque<:: kernel::bindings::module>;
230
230
}}
231
231
232
- kernel::ThisModule::from_ptr(__this_module.get())
232
+ :: kernel::ThisModule::from_ptr(__this_module.get())
233
233
}};
234
234
#[cfg(not(MODULE))]
235
- static THIS_MODULE: kernel::ThisModule = unsafe {{
236
- kernel::ThisModule::from_ptr(core::ptr::null_mut())
235
+ static THIS_MODULE: :: kernel::ThisModule = unsafe {{
236
+ :: kernel::ThisModule::from_ptr(:: core::ptr::null_mut())
237
237
}};
238
238
239
- impl kernel::ModuleMetadata for {type_} {{
240
- const NAME: &'static kernel::str::CStr = kernel::c_str!(\" {name}\" );
239
+ impl :: kernel::ModuleMetadata for {type_} {{
240
+ const NAME: &'static :: kernel::str::CStr = :: kernel::c_str!(\" {name}\" );
241
241
}}
242
242
243
243
// Double nested modules, since then nobody can access the public items inside.
@@ -255,8 +255,8 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
255
255
#[used]
256
256
static __IS_RUST_MODULE: () = ();
257
257
258
- static mut __MOD: core::mem::MaybeUninit<{type_}> =
259
- core::mem::MaybeUninit::uninit();
258
+ static mut __MOD: :: core::mem::MaybeUninit<{type_}> =
259
+ :: core::mem::MaybeUninit::uninit();
260
260
261
261
// Loadable modules need to export the `{{init,cleanup}}_module` identifiers.
262
262
/// # Safety
@@ -267,7 +267,7 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
267
267
#[doc(hidden)]
268
268
#[no_mangle]
269
269
#[link_section = \" .init.text\" ]
270
- pub unsafe extern \" C\" fn init_module() -> kernel::ffi::c_int {{
270
+ pub unsafe extern \" C\" fn init_module() -> :: kernel::ffi::c_int {{
271
271
// SAFETY: This function is inaccessible to the outside due to the double
272
272
// module wrapping it. It is called exactly once by the C side via its
273
273
// unique name.
@@ -306,11 +306,11 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
306
306
#[doc(hidden)]
307
307
#[link_section = \" {initcall_section}\" ]
308
308
#[used]
309
- pub static __{name}_initcall: extern \" C\" fn() -> kernel::ffi::c_int = __{name}_init;
309
+ pub static __{name}_initcall: extern \" C\" fn() -> :: kernel::ffi::c_int = __{name}_init;
310
310
311
311
#[cfg(not(MODULE))]
312
312
#[cfg(CONFIG_HAVE_ARCH_PREL32_RELOCATIONS)]
313
- core::arch::global_asm!(
313
+ :: core::arch::global_asm!(
314
314
r#\" .section \" {initcall_section}\" , \" a\"
315
315
__{name}_initcall:
316
316
.long __{name}_init - .
@@ -321,7 +321,7 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
321
321
#[cfg(not(MODULE))]
322
322
#[doc(hidden)]
323
323
#[no_mangle]
324
- pub extern \" C\" fn __{name}_init() -> kernel::ffi::c_int {{
324
+ pub extern \" C\" fn __{name}_init() -> :: kernel::ffi::c_int {{
325
325
// SAFETY: This function is inaccessible to the outside due to the double
326
326
// module wrapping it. It is called exactly once by the C side via its
327
327
// placement above in the initcall section.
@@ -344,9 +344,9 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
344
344
/// # Safety
345
345
///
346
346
/// This function must only be called once.
347
- unsafe fn __init() -> kernel::ffi::c_int {{
347
+ unsafe fn __init() -> :: kernel::ffi::c_int {{
348
348
let initer =
349
- <{type_} as kernel::InPlaceModule>::init(&super::super::THIS_MODULE);
349
+ <{type_} as :: kernel::InPlaceModule>::init(&super::super::THIS_MODULE);
350
350
// SAFETY: No data race, since `__MOD` can only be accessed by this module
351
351
// and there only `__init` and `__exit` access it. These functions are only
352
352
// called once and `__exit` cannot be called before or during `__init`.
0 commit comments