Commit 62244266 authored by Liao Chang's avatar Liao Chang Committed by Catalin Marinas

arm64: cpufeatures: Clean up temporary variable to simplify code

Clean up one temporary variable to simplifiy code in capability
detection.
Signed-off-by: default avatarLiao Chang <liaochang1@huawei.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20240229105208.456704-1-liaochang1@huawei.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 6d1ce806
...@@ -3052,13 +3052,9 @@ static void __init enable_cpu_capabilities(u16 scope_mask) ...@@ -3052,13 +3052,9 @@ static void __init enable_cpu_capabilities(u16 scope_mask)
boot_scope = !!(scope_mask & SCOPE_BOOT_CPU); boot_scope = !!(scope_mask & SCOPE_BOOT_CPU);
for (i = 0; i < ARM64_NCAPS; i++) { for (i = 0; i < ARM64_NCAPS; i++) {
unsigned int num;
caps = cpucap_ptrs[i]; caps = cpucap_ptrs[i];
if (!caps || !(caps->type & scope_mask)) if (!caps || !(caps->type & scope_mask) ||
continue; !cpus_have_cap(caps->capability))
num = caps->capability;
if (!cpus_have_cap(num))
continue; continue;
if (boot_scope && caps->cpu_enable) if (boot_scope && caps->cpu_enable)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment