From 0b9933b201f26d35596740bde8e202d570f072a3 Mon Sep 17 00:00:00 2001 From: nbuxrr Date: Wed, 8 May 2024 15:59:50 +0800 Subject: [PATCH] ref: cleancode --- plugin/thread_pool/threadpool_common.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugin/thread_pool/threadpool_common.cc b/plugin/thread_pool/threadpool_common.cc index ac00d9d18..1e646c7eb 100644 --- a/plugin/thread_pool/threadpool_common.cc +++ b/plugin/thread_pool/threadpool_common.cc @@ -476,10 +476,7 @@ static bool tptarget(void) { unsigned long long cpuId; __asm__ volatile("mrs %0, MIDR_EL1":"=r"(cpuId)); - - unsigned long long vendor = (cpuId >> 0x18) & 0xFF; - unsigned long long partId = (cpuId >> 0x4) & 0xFFF; - return ((vendor == 0x48) && partId == 0xD01); + return (((cpuId >> 0x18) & 0xFF) == 0x48); } thread_pool_rwlock_t gPluginLock; -- Gitee