Re: [PATCH 1/2] mm/mmap.c: Remove redundant variable 'addr' in arch_get_unmapped_area_topdown()
From: William Kucharski
Date: Wed Jan 23 2019 - 09:09:15 EST
> On Jan 20, 2019, at 1:13 AM, Yang Fan <nullptr.cpp@xxxxxxxxx> wrote:
> The variable 'addr' is redundant in arch_get_unmapped_area_topdown(),
> just use parameter 'addr0' directly. Then remove the const qualifier
> of the parameter, and change its name to 'addr'.
> Signed-off-by: Yang Fan <nullptr.cpp@xxxxxxxxx>
These seem similar enough I question whether they really need to be two
distinct patches, given both involve removing const keywords from the same
routine, and the shift to using the passed addr directly rather than
declaring and assigning addr from addr0 is a direct consequence of
removing the const.
I could be wrong though and easily persuaded otherwise.