From: David Hildenbrand <david@redhat.com>
To: Oscar Salvador <osalvador@suse.de>, akpm@linux-foundation.org
Cc: mike.kravetz@oracle.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm,hugetlb: Remove unneded initialization
Date: Fri, 20 Nov 2020 10:28:52 +0100 [thread overview]
Message-ID: <e969f1b4-bc9c-03dc-5e26-8b514ac90edf@redhat.com> (raw)
In-Reply-To: <20201119112141.6452-1-osalvador@suse.de>
On 19.11.20 12:21, Oscar Salvador wrote:
> 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.
>
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> ---
> mm/hugetlb.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 37f15c3c24dc..1c69e9044887 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -3197,8 +3197,6 @@ void __init hugetlb_add_hstate(unsigned int order)
> 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);
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2020-11-20 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 11:21 [PATCH] mm,hugetlb: Remove unneded initialization Oscar Salvador
2020-11-19 18:28 ` Mike Kravetz
2020-11-20 9:28 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e969f1b4-bc9c-03dc-5e26-8b514ac90edf@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).