The patch titled Subject: mm,hugetlb: remove unneded initialization has been added to the -mm tree. Its filename is mmhugetlb-remove-unneded-initialization.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mmhugetlb-remove-unneded-initialization.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mmhugetlb-remove-unneded-initialization.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Oscar Salvador <osalvador@xxxxxxx> Subject: mm,hugetlb: remove unneded initialization hugetlb_add_hstate initializes nr_huge_pages and free_huge_pages to 0, but since hstates[] is a global variable, all its fields are defined to 0 already. Link: https://lkml.kernel.org/r/20201119112141.6452-1-osalvador@xxxxxxx Signed-off-by: Oscar Salvador <osalvador@xxxxxxx> Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 2 -- 1 file changed, 2 deletions(-) --- a/mm/hugetlb.c~mmhugetlb-remove-unneded-initialization +++ a/mm/hugetlb.c @@ -3197,8 +3197,6 @@ void __init hugetlb_add_hstate(unsigned h = &hstates[hugetlb_max_hstate++]; h->order = order; h->mask = ~((1ULL << (order + PAGE_SHIFT)) - 1); - h->nr_huge_pages = 0; - h->free_huge_pages = 0; for (i = 0; i < MAX_NUMNODES; ++i) INIT_LIST_HEAD(&h->hugepage_freelists[i]); INIT_LIST_HEAD(&h->hugepage_activelist); _ Patches currently in -mm which might be from osalvador@xxxxxxx are mmhwpoison-drain-pcplists-before-bailing-out-for-non-buddy-zero-refcount-page.patch mmhwpoison-take-free-pages-off-the-buddy-freelists.patch mmhwpoison-take-free-pages-off-the-buddy-freelists-for-hugetlb.patch mmhwpoison-drop-unneeded-pcplist-draining.patch mmhugetlb-remove-unneded-initialization.patch