Skip to contentSkip to conversation

hugetlb-use-sizeof-to-get-the-array-size.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 12, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: hugetlb: use sizeof() to get the array size
has been removed from the -mm tree. Its filename was
hugetlb-use-sizeof-to-get-the-array-size.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: Miaohe Lin <[email protected]>
Subject: hugetlb: use sizeof() to get the array size
Date: Thu, 1 Sep 2022 20:00:24 +0800

It's better to use sizeof() to get the array size instead of manual calculation. Minor readability improvement.

---

 mm/hugetlb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/hugetlb.c renamed from mm/hugetlb.c~hugetlb-use-sizeof-to-get-the-array-size +2 -2
@@ -4149,11 +4149,11 @@ static void __init hugepages_clear_pages
 	if (!hugetlb_max_hstate) {
 		default_hstate_max_huge_pages = 0;
 		memset(default_hugepages_in_node, 0,
-			MAX_NUMNODES * sizeof(unsigned int));
+			sizeof(default_hugepages_in_node));
 	} else {
 		parsed_hstate->max_huge_pages = 0;
 		memset(parsed_hstate->max_huge_pages_node, 0,
-			MAX_NUMNODES * sizeof(unsigned int));
+			sizeof(parsed_hstate->max_huge_pages_node));
 	}
 }
 

_

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

mm-hwpoison-use-clearpagehwpoison-in-memory_failure.patch mm-hwpoison-use-__pagemovable-to-detect-non-lru-movable-pages.patch mm-hwpoison-use-num_poisoned_pages_sub-to-decrease-num_poisoned_pages.patch mm-hwpoison-avoid-unneeded-page_mapped_in_vma-overhead-in-collect_procs_anon.patch mm-hwpoison-check-pagetable-explicitly-in-hwpoison_user_mappings.patch mm-hwpoison-cleanup-some-obsolete-comments.patch writeback-remove-unused-macro-dirty_full_scope.patch