[PATCH] x86/mtrr: Remove redundant code
From: Jiapeng Chong
Date: Wed Oct 18 2023 - 03:42:12 EST
arch/x86/kernel/cpu/mtrr/cleanup.c:943:4: warning: Value stored to 'highest_pfn' is never read.
Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6912
Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
---
arch/x86/kernel/cpu/mtrr/cleanup.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c
index 18cf79d6e2c5..c4ec295cebbc 100644
--- a/arch/x86/kernel/cpu/mtrr/cleanup.c
+++ b/arch/x86/kernel/cpu/mtrr/cleanup.c
@@ -939,8 +939,6 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
if (mtrr_tom2) {
range[nr_range].start = (1ULL<<(32 - PAGE_SHIFT));
range[nr_range].end = mtrr_tom2 >> PAGE_SHIFT;
- if (highest_pfn < range[nr_range].end)
- highest_pfn = range[nr_range].end;
nr_range++;
}
nr_range = x86_get_mtrr_mem_range(range, nr_range, 0, 0);
--
2.20.1.7.g153144c