mirror of https://gitee.com/openkylin/linux.git
mm/memblock: remove rgnbase and rgnsize variables
Remove rgnbase and rgnsize variables from memblock_overlaps_region(). We use these variables only for passing to the memblock_addrs_overlap() function and that's all. Let's remove them. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5020e28585
commit
f14516fbf0
|
@ -96,13 +96,10 @@ bool __init_memblock memblock_overlaps_region(struct memblock_type *type,
|
|||
{
|
||||
unsigned long i;
|
||||
|
||||
for (i = 0; i < type->cnt; i++) {
|
||||
phys_addr_t rgnbase = type->regions[i].base;
|
||||
phys_addr_t rgnsize = type->regions[i].size;
|
||||
if (memblock_addrs_overlap(base, size, rgnbase, rgnsize))
|
||||
for (i = 0; i < type->cnt; i++)
|
||||
if (memblock_addrs_overlap(base, size, type->regions[i].base,
|
||||
type->regions[i].size))
|
||||
break;
|
||||
}
|
||||
|
||||
return i < type->cnt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue