Skip to content

Commit

Permalink
Kernel: Fix compiler warnings for new memory syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
corigan01 committed Jan 28, 2025
1 parent 94944aa commit c644bd1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion crates/mem/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use crate::{
pmm::SharedPhysPage,
};
use alloc::{boxed::Box, collections::BTreeMap, sync::Arc, vec::Vec};
use boolvec::BoolVec;
use spin::RwLock;
use util::consts::PAGE_4K;

Expand Down
5 changes: 1 addition & 4 deletions kernel/src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use arch::{
use lldebug::{log, logln, sync::Mutex, warnln};
use mem::{
addr::VirtAddr,
page::VirtPage,
paging::VmPermissions,
vm::{PageFaultInfo, call_page_fault_handler},
};
Expand Down Expand Up @@ -282,9 +281,7 @@ extern "C" fn syscall_handler(
_ => return SysMemoryError::InvalidRequest as u64,
};

let region = process.read().add_anywhere(len, protection, false);
logln!("{:#?}", region);
return match region {
return match process.read().add_anywhere(len, protection, false) {
Ok(region) => region.start.addr().addr() as u64,
Err(_) => SysMemoryError::InvalidRequest as u64,
};
Expand Down

0 comments on commit c644bd1

Please sign in to comment.