]> Git Repo - linux.git/commitdiff
mm/sparse.c: remove NULL check in clear_hwpoisoned_pages()
authorAlastair D'Silva <[email protected]>
Mon, 23 Sep 2019 22:36:33 +0000 (15:36 -0700)
committerLinus Torvalds <[email protected]>
Tue, 24 Sep 2019 22:54:09 +0000 (15:54 -0700)
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 by commit
ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug"), so there is no
longer a possibility that memmap can be NULL.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Alastair D'Silva <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: Qian Cai <[email protected]>
Cc: Alexander Duyck <[email protected]>
Cc: Logan Gunthorpe <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Balbir Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/sparse.c

index d7af5cfdc810241afc08c80febff38ce750434ab..bf32de9e666b5697f74cdbe319d4c783237065ab 100644 (file)
@@ -896,9 +896,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
This page took 0.047484 seconds and 4 git commands to generate.