mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
arm64: cpufeatures: Clean up temporary variable to simplify code
Clean up one temporary variable to simplifiy code in capability detection. Signed-off-by: Liao Chang <liaochang1@huawei.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20240229105208.456704-1-liaochang1@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
6d1ce806e1
commit
622442666d
|
|
@ -3052,13 +3052,9 @@ static void __init enable_cpu_capabilities(u16 scope_mask)
|
|||
boot_scope = !!(scope_mask & SCOPE_BOOT_CPU);
|
||||
|
||||
for (i = 0; i < ARM64_NCAPS; i++) {
|
||||
unsigned int num;
|
||||
|
||||
caps = cpucap_ptrs[i];
|
||||
if (!caps || !(caps->type & scope_mask))
|
||||
continue;
|
||||
num = caps->capability;
|
||||
if (!cpus_have_cap(num))
|
||||
if (!caps || !(caps->type & scope_mask) ||
|
||||
!cpus_have_cap(caps->capability))
|
||||
continue;
|
||||
|
||||
if (boot_scope && caps->cpu_enable)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user