mirror of
https://github.com/torvalds/linux.git
synced 2026-04-24 09:35:52 -04:00
mm/memblock: remove empty dummy entry
The dummy entry is introduced in the initial implementation of lmb in commit7c8c6b9776("powerpc: Merge lmb.c and make MM initialization use it."). As the comment says the empty dummy entry is to simplify the code. /* Create a dummy zero size LMB which will get coalesced away later. * This simplifies the lmb_add() code below... */ While current code is reimplemented by Tejun in commit784656f9c6("memblock: Reimplement memblock_add_region()"). This empty dummy entry seems not benefit the code any more. Let's remove it. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> CC: Paul Mackerras <paulus@ozlabs.org> CC: Tejun Heo <tj@kernel.org> CC: Mike Rapoport <rppt@kernel.org> Link: https://lore.kernel.org/r/20240405015821.13411-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
This commit is contained in:
committed by
Mike Rapoport (IBM)
parent
c3f38fa61a
commit
721f4a6526
@@ -40,13 +40,13 @@ void reset_memblock_regions(void)
|
||||
{
|
||||
memset(memblock.memory.regions, 0,
|
||||
memblock.memory.cnt * sizeof(struct memblock_region));
|
||||
memblock.memory.cnt = 1;
|
||||
memblock.memory.cnt = 0;
|
||||
memblock.memory.max = INIT_MEMBLOCK_REGIONS;
|
||||
memblock.memory.total_size = 0;
|
||||
|
||||
memset(memblock.reserved.regions, 0,
|
||||
memblock.reserved.cnt * sizeof(struct memblock_region));
|
||||
memblock.reserved.cnt = 1;
|
||||
memblock.reserved.cnt = 0;
|
||||
memblock.reserved.max = INIT_MEMBLOCK_RESERVED_REGIONS;
|
||||
memblock.reserved.total_size = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user