* [PATCH] x86/mm: Remove unnecessary logic from numa_cleanup_meminfo()
@ 2023-12-07 4:18 Yuntao Wang
0 siblings, 0 replies; only message in thread
From: Yuntao Wang @ 2023-12-07 4:18 UTC (permalink / raw)
To: linux-kernel, x86
Cc: Dave Hansen, Andy Lutomirski, Peter Zijlstra, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, H. Peter Anvin, Yuntao Wang
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.
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
---
arch/x86/mm/numa.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index b29ceb19e46e..f7336077b07e 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -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,
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-07 4:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 4:18 [PATCH] x86/mm: Remove unnecessary logic from numa_cleanup_meminfo() Yuntao Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®