[PATCH] arm64: Refactor conditional logic
Hardevsinh Palaniya
hardevsinh.palaniya at siliconsignals.io
Mon Nov 11 06:21:45 PST 2024
Unnecessarily checks ftr_ovr == tmp in an extra else if, which is not
needed because that condition would already be true by default if the
previous conditions are not satisfied.
Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya at siliconsignals.io>
---
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 718728a85430..d9021b1b9cff 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -989,7 +989,7 @@ static void init_cpu_ftr_reg(u32 sys_reg, u64 new)
/* Override was valid */
ftr_new = tmp;
str = "forced";
- } else if (ftr_ovr == tmp) {
+ } else {
/* Override was the safe value */
str = "already set";
}
--
2.43.0
More information about the linux-arm-kernel
mailing list