Re: [PATCH 2/2] mm: don't hide potentially null memmap pointer in sparse_remove_section

From: Michal Hocko
Date: Tue Aug 27 2019 - 03:22:46 EST


On Tue 27-08-19 17:00:16, Alastair D'Silva wrote:
[...]
> The NULL 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.
>
> With this in mind, since that situation is no longer true, I think we
> could instead drop the NULL check.

This would be much more preferable to the original patch.

--
Michal Hocko
SUSE Labs