From 7a4f6da61b3162e137a383682fa8794c90e85ba4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 22 Aug 2021 12:39:48 +0200 Subject: [PATCH] Kernel: Fix some trivial clang-tidy warnings in x86/common/Processor.cpp --- Kernel/Arch/x86/common/Processor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index 10f035c890..496664c8e8 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -549,7 +549,7 @@ Vector Processor::capture_stack_trace(Thread& thread, size_t max_frames // to be ebp. ProcessPagingScope paging_scope(thread.process()); auto& regs = thread.regs(); - FlatPtr* stack_top = reinterpret_cast(regs.sp()); + auto* stack_top = reinterpret_cast(regs.sp()); if (Memory::is_user_range(VirtualAddress(stack_top), sizeof(FlatPtr))) { if (!copy_from_user(&frame_ptr, &((FlatPtr*)stack_top)[0])) frame_ptr = 0; @@ -1220,7 +1220,7 @@ extern "C" void context_first_init([[maybe_unused]] Thread* from_thread, [[maybe auto in_critical = to_thread->saved_critical(); VERIFY(in_critical > 0); - Processor::current().restore_in_critical(in_critical); + Processor::restore_in_critical(in_critical); // Since we got here and don't have Scheduler::context_switch in the // call stack (because this is the first time we switched into this @@ -1283,7 +1283,7 @@ extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread) auto in_critical = to_thread->saved_critical(); VERIFY(in_critical > 0); - processor.restore_in_critical(in_critical); + Processor::restore_in_critical(in_critical); if (has_fxsr) asm volatile("fxrstor %0" ::"m"(to_thread->fpu_state()));