Skip to content

Commit 6224426

Browse files
Liao Changctmarinas
authored andcommitted
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>
1 parent 6d1ce80 commit 6224426

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

arch/arm64/kernel/cpufeature.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,13 +3052,9 @@ static void __init enable_cpu_capabilities(u16 scope_mask)
30523052
boot_scope = !!(scope_mask & SCOPE_BOOT_CPU);
30533053

30543054
for (i = 0; i < ARM64_NCAPS; i++) {
3055-
unsigned int num;
3056-
30573055
caps = cpucap_ptrs[i];
3058-
if (!caps || !(caps->type & scope_mask))
3059-
continue;
3060-
num = caps->capability;
3061-
if (!cpus_have_cap(num))
3056+
if (!caps || !(caps->type & scope_mask) ||
3057+
!cpus_have_cap(caps->capability))
30623058
continue;
30633059

30643060
if (boot_scope && caps->cpu_enable)

0 commit comments

Comments
 (0)