mm/memblock: remove rgnbase and rgnsize variables
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Thu, 14 Jan 2016 23:20:39 +0000 (15:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
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>
mm/memblock.c

index 9695398a14c046fc492af0e39b68603b418e8ab8..c33a2a2ae69fdcb3c0be538fc1087ea82e15e093 100644 (file)
@@ -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;
 }