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 <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 6d1ce80 commit 6224426

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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)