From ff85f10ba8e4d3b4c6f8f5c9f6b47f3e80a067f1 Mon Sep 17 00:00:00 2001 From: Shaokun Zhang Date: Fri, 16 Jul 2021 13:58:09 +0800 Subject: [PATCH] arm64: cpufeature: Use defined macro instead of magic numbers Use defined macro to simplify the code and make it more readable. Cc: Marc Zyngier Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1626415089-57584-1-git-send-email-zhangshaokun@hisilicon.com Acked-by: Will Deacon Signed-off-by: Catalin Marinas --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 0ead8bf..2e4ec12 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1734,7 +1734,7 @@ static void cpu_has_fwb(const struct arm64_cpu_capabilities *__unused) u64 val = read_sysreg_s(SYS_CLIDR_EL1); /* Check that CLIDR_EL1.LOU{U,IS} are both 0 */ - WARN_ON(val & (7 << 27 | 7 << 21)); + WARN_ON(CLIDR_LOUU(val) || CLIDR_LOUIS(val)); } #ifdef CONFIG_ARM64_PAN -- 2.7.4