Skip to contentSkip to conversation

x86/mm: Remove unnecessary logic from numa_cleanup_meminfo()

PATCH New Yuntao Wang 1 participant 1 message Dec 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mm: Remove unnecessary logic from numa_cleanup_meminfo()

The bi->start field is of type u64, which can only hold values greater than or equal to 0. Therefore, the logic bi->start = max(bi->start, low) is unnecessary. Remove it.

---
 arch/x86/mm/numa.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/mm/numa.c +0 -4
index b29ceb19e46e..f7336077b07e 100644
@@ -239,7 +239,6 @@ static void __init alloc_node_data(int nid)
  */
 int __init numa_cleanup_meminfo(struct numa_meminfo *mi)
 {
-	const u64 low = 0;
 	const u64 high = PFN_PHYS(max_pfn);
 	int i, j, k;
 
@@ -254,9 +253,6 @@ int __init numa_cleanup_meminfo(struct numa_meminfo *mi)
 			continue;
 		}
 
-		/* make sure all non-reserved blocks are inside the limits */
-		bi->start = max(bi->start, low);
-
 		/* preserve info for non-RAM areas above 'max_pfn': */
 		if (bi->end > high) {
 			numa_add_memblk_to(bi->nid, high, bi->end,
Signature · 1 line
2.43.0