From 1d3c3230fc9a7f61ea5806fd615a47eb84470e34 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 6 Mar 2023 21:18:00 -0700 Subject: [PATCH] kern: minor cleanup (thanks @liamwhite) --- libmesosphere/include/mesosphere/kern_k_object_name.hpp | 2 +- libmesosphere/include/mesosphere/kern_k_priority_queue.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libmesosphere/include/mesosphere/kern_k_object_name.hpp b/libmesosphere/include/mesosphere/kern_k_object_name.hpp index c7ac703b..bc1b0e37 100644 --- a/libmesosphere/include/mesosphere/kern_k_object_name.hpp +++ b/libmesosphere/include/mesosphere/kern_k_object_name.hpp @@ -48,7 +48,7 @@ namespace ams::kern { /* Check that the object is closed. */ R_UNLESS(derived->IsServerClosed(), svc::ResultInvalidState()); - return Delete(obj.GetPointerUnsafe(), name); + R_RETURN(Delete(obj.GetPointerUnsafe(), name)); } template requires std::derived_from diff --git a/libmesosphere/include/mesosphere/kern_k_priority_queue.hpp b/libmesosphere/include/mesosphere/kern_k_priority_queue.hpp index 6a14b85d..87d3fb1b 100644 --- a/libmesosphere/include/mesosphere/kern_k_priority_queue.hpp +++ b/libmesosphere/include/mesosphere/kern_k_priority_queue.hpp @@ -234,11 +234,11 @@ namespace ams::kern { KPriorityQueueImpl m_scheduled_queue; KPriorityQueueImpl m_suggested_queue; private: - constexpr ALWAYS_INLINE void ClearAffinityBit(u64 &affinity, s32 core) { + static constexpr ALWAYS_INLINE void ClearAffinityBit(u64 &affinity, s32 core) { affinity &= ~(UINT64_C(1) << core); } - constexpr ALWAYS_INLINE s32 GetNextCore(u64 &affinity) { + static constexpr ALWAYS_INLINE s32 GetNextCore(u64 &affinity) { const s32 core = __builtin_ctzll(static_cast(affinity)); ClearAffinityBit(affinity, core); return core;