Skip to content

Commit d55f1d9

Browse files
committed
Alex's #2 review
Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 351ab09 commit d55f1d9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

drivers/char/rust_example/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
name = "rust_example"
77
version = "0.1.0"
88
edition = "2018"
9+
publish = false
910

1011
[lib]
1112
crate-type = ["staticlib"]

rust/kernel/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name = "kernel"
55
version = "0.1.0"
66
authors = ["Rust for Linux Contributors"]
77
edition = "2018"
8+
publish = false
89

910
[dependencies]
1011
bitflags = "1"

rust/kernel/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,16 @@ macro_rules! kernel_module {
5353

5454
// Built-in modules are initialized through an initcall pointer
5555
//
56-
// TODO: find a proper way to emulate the C macro, including
57-
// dealing with `HAVE_ARCH_PREL32_RELOCATIONS`
56+
// TODO: find a proper way to emulate the C macro (`module_init`),
57+
// including dealing with `HAVE_ARCH_PREL32_RELOCATIONS`
5858
#[cfg(not(module))]
5959
#[link_section = ".initcall6.init"]
6060
#[used]
6161
pub static __initcall: extern "C" fn() -> $crate::c_types::c_int = init_module;
6262

63+
// TODO: pass the kernel module name here to generate a unique,
64+
// helpful symbol name (the name would also useful for the `modinfo`
65+
// issue below).
6366
#[no_mangle]
6467
pub extern "C" fn init_module() -> $crate::c_types::c_int {
6568
match <$module as $crate::KernelModule>::init() {

0 commit comments

Comments
 (0)