Skip to content

Commit 8311cae

Browse files
authored
Merge pull request torvalds#635 from ojeda/attr
rust: avoid the need of crate attributes in kernel modules
2 parents ea924a7 + 59c8746 commit 8311cae

14 files changed

+5
-41
lines changed

drivers/android/rust_binder.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
//!
55
//! TODO: This module is a work in progress.
66
7-
#![no_std]
8-
#![feature(global_asm, allocator_api, concat_idents, generic_associated_types)]
9-
107
use kernel::{
118
io_buffer::IoBufferWriter,
129
linked_list::{GetLinks, GetLinksWrapped, Links},

drivers/char/hw_random/bcm2835_rng_rust.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Broadcom BCM2835 Random Number Generator support.
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::{
96
c_str, device, file::File, file_operations::FileOperations, io_buffer::IoBufferWriter, miscdev,
107
module_platform_driver, of, platform, prelude::*, sync::Ref,

drivers/gpio/gpio_pl061_rust.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
//!
55
//! Based on the C driver written by Baruch Siach <baruch@tkos.co.il>.
66
7-
#![no_std]
8-
#![feature(global_asm, allocator_api)]
9-
107
use kernel::{
118
amba, bit, bits_iter, define_amba_id_table, device, gpio,
129
io_mem::IoMem,

samples/rust/rust_chrdev.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Rust character device sample
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::prelude::*;
96
use kernel::{chrdev, file, file_operations::FileOperations};
107

samples/rust/rust_minimal.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Rust minimal sample
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::prelude::*;
96

107
module! {

samples/rust/rust_miscdev.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Rust miscellaneous device sample
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::prelude::*;
96
use kernel::{
107
file::File,

samples/rust/rust_module_parameters.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Rust module parameters sample
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::prelude::*;
96

107
module! {

samples/rust/rust_platform.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Rust platform device driver sample.
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::{module_platform_driver, of, platform, prelude::*};
96

107
module_platform_driver! {

samples/rust/rust_print.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Rust printing macros sample
44
5-
#![no_std]
6-
#![feature(allocator_api, global_asm)]
7-
85
use kernel::prelude::*;
96
use kernel::{pr_cont, str::CStr, ThisModule};
107

samples/rust/rust_random.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
//! Adapted from Alex Gaynor's original available at
66
//! <https://github.com/alex/just-use/blob/master/src/lib.rs>.
77
8-
#![no_std]
9-
#![feature(allocator_api, global_asm)]
10-
118
use kernel::{
129
file::File,
1310
file_operations::FileOperations,

0 commit comments

Comments
 (0)