Fix a couple of unused import warnings

This commit is contained in:
bjorn3
2026-03-30 18:38:25 +02:00
parent 675ba2ea51
commit 2fc2d5897a
8 changed files with 9 additions and 23 deletions
+3 -6
View File
@@ -2,10 +2,7 @@ use core::{mem, ptr};
use core::ptr::{read_volatile, write_volatile};
use crate::{
find_one_sdt,
memory::{map_device_memory, PhysicalAddress, PAGE_SIZE},
};
use crate::{find_one_sdt, memory::PhysicalAddress};
use super::{sdt::Sdt, GenericAddressStructure, ACPI_TABLE};
@@ -98,9 +95,9 @@ impl Hpet {
impl Hpet {
pub unsafe fn map(&self) {
unsafe {
map_device_memory(
crate::memory::map_device_memory(
PhysicalAddress::new(self.base_address.address as usize),
PAGE_SIZE,
crate::memory::PAGE_SIZE,
);
}
}
@@ -1,6 +1,6 @@
//! Functions and bitfield definitions for `ID_AA64*` system registers. (e.g. `ID_AA64ISAR0_EL1`)
use core::{arch::asm, iter};
use core::arch::asm;
bitfield::bitfield! {
pub struct AA64Isar0(u64);
+1 -3
View File
@@ -11,9 +11,7 @@ use core::{
use fdt::Fdt;
use crate::{
allocator, arch::interrupt, device, devices::graphical_debug, dtb, paging, startup::KernelArgs,
};
use crate::{allocator, device, devices::graphical_debug, dtb, paging, startup::KernelArgs};
/// Test of zero values in BSS.
static mut BSS_TEST_ZERO: usize = 0;
+1 -1
View File
@@ -35,7 +35,7 @@ pub unsafe fn init_clint(fdt: &Fdt) {
.compatible()
.unwrap()
.all()
.find(|x| ((*x).eq("riscv,clint0")))
.find(|x| (*x).eq("riscv,clint0"))
.is_some());
let clint = Clint::new(clock_freq, &clint_node);
-1
View File
@@ -6,7 +6,6 @@ use crate::{
arch::{device::irqchip, start::BOOT_HART_ID},
context::signal::excp_handler,
memory::GenericPfFlags,
panic::stack_trace,
ptrace,
sync::CleanLockToken,
syscall::{self, flag::*},
+1 -6
View File
@@ -6,12 +6,7 @@ use core::{
use crate::{
allocator,
memory::Frame,
paging::{PhysicalAddress, PAGE_SIZE},
};
use crate::{
arch::{device::serial::init_early, interrupt, paging},
arch::{device::serial::init_early, paging},
device,
devices::graphical_debug,
interrupt::exception_handler,
+1 -1
View File
@@ -6,7 +6,7 @@ use crate::{
};
use core::{mem, mem::offset_of, ptr, sync::atomic::AtomicBool};
use spin::Once;
use syscall::{EnvRegisters, Error, Result, ENOMEM};
use syscall::{EnvRegisters, Result};
/// This must be used by the kernel to ensure that context switches are done atomically
/// Compare and exchange this to true when beginning a context switch on any CPU
+1 -4
View File
@@ -1,8 +1,5 @@
use crate::{
arch::interrupt::InterruptStack,
context::context::Kstack,
memory::{KernelMapper, RmmA},
percpu::PercpuBlock,
arch::interrupt::InterruptStack, context::context::Kstack, memory::RmmA, percpu::PercpuBlock,
syscall::FloatRegisters,
};
use core::{mem::offset_of, sync::atomic::AtomicBool};