Skip to content

Commit fb3b505

Browse files
committed
remove compiler warnings
1 parent a227454 commit fb3b505

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/arch/aarch64/kernel/interrupts.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const MAX_HANDLERS: usize = 256;
2424
/// The ID of the first Private Peripheral Interrupt.
2525
const PPI_START: u8 = 16;
2626
/// The ID of the first Shared Peripheral Interrupt.
27+
#[allow(dead_code)]
2728
const SPI_START: u8 = 32;
2829
/// Software-generated interrupt for rescheduling
2930
pub(crate) const SGI_RESCHED: u8 = 1;
@@ -93,6 +94,7 @@ pub fn disable() {
9394
}
9495
}
9596

97+
#[allow(dead_code)]
9698
pub(crate) fn irq_install_handler(irq_number: u8, handler: HandlerFunc) {
9799
debug!("Install handler for interrupt {}", irq_number);
98100
unsafe {
@@ -348,7 +350,8 @@ pub(crate) fn init() {
348350
static IRQ_NAMES: InterruptTicketMutex<HashMap<u8, &'static str, RandomState>> =
349351
InterruptTicketMutex::new(HashMap::with_hasher(RandomState::with_seeds(0, 0, 0, 0)));
350352

351-
pub fn add_irq_name(irq_number: u8, name: &'static str) {
353+
#[allow(dead_code)]
354+
pub(crate) fn add_irq_name(irq_number: u8, name: &'static str) {
352355
debug!("Register name \"{}\" for interrupt {}", name, irq_number);
353356
IRQ_NAMES.lock().insert(SPI_START + irq_number, name);
354357
}
@@ -357,10 +360,10 @@ fn get_irq_name(irq_number: u8) -> Option<&'static str> {
357360
IRQ_NAMES.lock().get(&irq_number).copied()
358361
}
359362

360-
pub static IRQ_COUNTERS: InterruptSpinMutex<BTreeMap<CoreId, &IrqStatistics>> =
363+
pub(crate) static IRQ_COUNTERS: InterruptSpinMutex<BTreeMap<CoreId, &IrqStatistics>> =
361364
InterruptSpinMutex::new(BTreeMap::new());
362365

363-
pub struct IrqStatistics {
366+
pub(crate) struct IrqStatistics {
364367
pub counters: [AtomicU64; 256],
365368
}
366369

@@ -378,7 +381,7 @@ impl IrqStatistics {
378381
}
379382
}
380383

381-
pub fn print_statistics() {
384+
pub(crate) fn print_statistics() {
382385
info!("Number of interrupts");
383386
for (core_id, irg_statistics) in IRQ_COUNTERS.lock().iter() {
384387
for (i, counter) in irg_statistics.counters.iter().enumerate() {

0 commit comments

Comments
 (0)