[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <96250f1e-edf9-6c49-f0dc-21c17dee6657@redhat.com>
Date: Fri, 30 Aug 2019 16:04:46 +0200
From: David Hildenbrand <david@...hat.com>
To: Alastair D'Silva <alastair@...ilva.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
Michal Hocko <mhocko@...e.com>,
Wei Yang <richard.weiyang@...il.com>, Qian Cai <cai@....pw>,
Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
Logan Gunthorpe <logang@...tatee.com>,
Baoquan He <bhe@...hat.com>,
Balbir Singh <bsingharora@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Remove NULL check in clear_hwpoisoned_pages()
On 29.08.19 05:51, Alastair D'Silva wrote:
> There is no possibility for memmap to be NULL in the current
> codebase.
>
> This check was added in commit 95a4774d055c ("memory-hotplug:
> update mce_bad_pages when removing the memory")
> where memmap was originally inited to NULL, and only conditionally
> given a value.
>
> The code that could have passed a NULL has been removed, so there
> is no longer a possibility that memmap can be NULL.
>
> Signed-off-by: Alastair D'Silva <alastair@...ilva.org>
> ---
> mm/sparse.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/mm/sparse.c b/mm/sparse.c
> index 78979c142b7d..9f7e3682cdcb 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -754,9 +754,6 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
> {
> int i;
>
> - if (!memmap)
> - return;
> -
> /*
> * A further optimization is to have per section refcounted
> * num_poisoned_pages. But that would need more space per memmap, so
>
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists