Skip to content

Commit 757bc7a

Browse files
kernel: fix build warnings
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent 5c31d40 commit 757bc7a

File tree

5 files changed

+2
-45
lines changed

5 files changed

+2
-45
lines changed

src/aero_kernel/src/fs/block/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,14 @@ impl Device for BlockDevice {
260260
}
261261

262262
struct PartitionBlockDevice {
263-
sref: Weak<Self>,
264-
265263
offset: usize, // offset in sectors
266264
size: usize, // capacity in sectors
267265
device: Arc<dyn BlockDeviceInterface>,
268266
}
269267

270268
impl PartitionBlockDevice {
271269
fn new(offset: usize, size: usize, device: Arc<dyn BlockDeviceInterface>) -> Arc<Self> {
272-
Arc::new_cyclic(|sref| Self {
273-
sref: sref.clone(),
274-
270+
Arc::new(Self {
275271
offset,
276272
size,
277273
device,

src/aero_kernel/src/modules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//! aero_kernel::module_exit!(hello_exit);
3232
//! ```
3333
34-
use crate::{drivers, fs, utils::linker::LinkerSymbol};
34+
use crate::{drivers, fs};
3535

3636
/// Inner helper function to make sure the function provided to the [module_init] macro
3737
/// has a valid function signature. This function returns the passed module init function as

src/aero_kernel/src/syscall/fs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use aero_syscall::signal::SigProcMask;
2121
use aero_syscall::{prelude::*, TimeSpec};
2222
use aero_syscall::{OpenFlags, Stat, SyscallError};
2323

24-
use crate::fs::cache::DirCacheImpl;
2524
use crate::fs::epoll::EPoll;
2625
use crate::fs::eventfd::EventFd;
2726
use crate::fs::file_table::DuplicateHint;

src/aero_kernel/src/utils/linker.rs

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/aero_kernel/src/utils/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ fn get_cpu_count() -> usize {
3232

3333
pub mod bitmap;
3434
pub mod buffer;
35-
pub mod linker;
3635
pub mod sync;
3736

3837
pub fn validate_mut_ptr<T>(ptr: *mut T) -> Option<&'static mut T> {

0 commit comments

Comments
 (0)