* [merged mm-stable] hugetlb-use-sizeof-to-get-the-array-size.patch removed from -mm tree
@ 2022-09-12 3:30 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-09-12 3:30 UTC (permalink / raw)
To: mm-commits, songmuchun, mike.kravetz, linmiaohe, akpm
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 <linmiaohe@huawei.com>
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.
Link: https://lkml.kernel.org/r/20220901120030.63318-5-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/hugetlb.c~hugetlb-use-sizeof-to-get-the-array-size
+++ a/mm/hugetlb.c
@@ -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 linmiaohe@huawei.com 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-12 3:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12 3:30 [merged mm-stable] hugetlb-use-sizeof-to-get-the-array-size.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.