1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

Kernel: Stop using 'int's for indices in interrupt handling

This commit is contained in:
Idan Horowitz 2022-09-25 15:29:24 +03:00
parent 6f6211c5e6
commit 04b1d32b70
4 changed files with 14 additions and 15 deletions

View file

@ -51,7 +51,7 @@ UNMAP_AFTER_INIT void InterruptManagement::initialize()
void InterruptManagement::enumerate_interrupt_handlers(Function<void(GenericInterruptHandler&)> callback)
{
for (int i = 0; i < GENERIC_INTERRUPT_HANDLERS_COUNT; i++) {
for (size_t i = 0; i < GENERIC_INTERRUPT_HANDLERS_COUNT; i++) {
auto& handler = get_interrupt_handler(i);
if (handler.type() == HandlerType::SharedIRQHandler) {
static_cast<SharedIRQHandler&>(handler).enumerate_handlers(callback);
@ -62,9 +62,8 @@ void InterruptManagement::enumerate_interrupt_handlers(Function<void(GenericInte
}
}
IRQController& InterruptManagement::get_interrupt_controller(int index)
IRQController& InterruptManagement::get_interrupt_controller(size_t index)
{
VERIFY(index >= 0);
return *m_interrupt_controllers[index];
}