Skip to contentSkip to conversation

arch_numa: remove redundant nodes_empty() check in numa_init()

PATCH Applied Sang-Heon Jeon 2 participants 2 messages Oct 16 – Nov 2

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

PATCH 1/1 arch_numa: remove redundant nodes_empty() check in numa_init()

numa_memblks_init() returns 0 only if numa_nodes_parsed is not empty, so the nodes_empty() check after the call in numa_init() is always false.

So remove the check.

No functional change.

---
 mm/arch_numa.c | 6 ------
 1 file changed, 6 deletions(-)
mm/arch_numa.c +0 -6
index a4b1732274fa..60218d422118 100644
@@ -244,12 +244,6 @@ static int __init numa_init(int (*init_func)(void))
 	if (ret < 0)
 		goto out_free_distance;
 
-	if (nodes_empty(numa_nodes_parsed)) {
-		pr_info("No NUMA configuration found\n");
-		ret = -EINVAL;
-		goto out_free_distance;
-	}
-
 	ret = numa_register_nodes();
 	if (ret < 0)
 		goto out_free_distance;

base-commit: 5728d3523f12826a2b180c1c5738f74e33197e14

Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 9 lines · Sang-Heon Jeon

numa_memblks_init() returns 0 only if numa_nodes_parsed is not empty, so the nodes_empty() check after the call in numa_init() is always false.

So remove the check.

No functional change.

[...]

Applied to for-next branch of memblock.git tree, thanks!

[1/1] arch_numa: remove redundant nodes_empty() check in numa_init()

      commit: 03de248a2039eda42d9cff7e6bd1cf23acdf98d6

tree: https://git.kernel.org/pub/scm/linux/kernel/git/mm/memblock
branch: for-next

--
Sincerely yours,
Mike.