Skip to contentSkip to conversation

mm-sparse-nr_pages-wont-be-0.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 29, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/sparse: nr_pages won't be 0
has been removed from the -mm tree. Its filename was
mm-sparse-nr_pages-wont-be-0.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/sparse: nr_pages won't be 0
Date: Wed, 19 Jun 2024 01:06:09 +0000

Function subsection_map_init() is only used in free_area_init() in the loop of for_each_mem_pfn_range(). And we are sure in each iteration of for_each_mem_pfn_range(), start_pfn < end_pfn.

So nr_pages is not possible to be 0 and we can remove the check.

---

 mm/sparse.c |    3 ---
 1 file changed, 3 deletions(-)
mm/sparse.c renamed from mm/sparse.c~mm-sparse-nr_pages-wont-be-0 +0 -3
@@ -195,9 +195,6 @@ void __init subsection_map_init(unsigned
 	int end_sec_nr = pfn_to_section_nr(pfn + nr_pages - 1);
 	unsigned long nr, start_sec_nr = pfn_to_section_nr(pfn);
 
-	if (!nr_pages)
-		return;
-
 	for (nr = start_sec_nr; nr <= end_sec_nr; nr++) {
 		struct mem_section *ms;
 		unsigned long pfns;

_

Patches currently in -mm which might be from [email protected] are